How to insert NaN at the end of matrix (.mat)

3 ビュー (過去 30 日間)
Eliane Truccolo
Eliane Truccolo 2017 年 2 月 2 日
コメント済み: John Chilleri 2017 年 2 月 2 日
I have a matrix (.mat) with two columns and I want to insert a line of NaN at the end of matrix...

採用された回答

John Chilleri
John Chilleri 2017 年 2 月 2 日
編集済み: John Chilleri 2017 年 2 月 2 日
Hello,
Would it be sufficient to:
load('your_file.mat')
Matrix_Name = [Matrix_Name; NaN NaN];
% Get rid of extra workspace variables so they're not also saved:
clearvars -except Matrix_Name
save('your_file.mat')
Hope this helps!
  4 件のコメント
Eliane Truccolo
Eliane Truccolo 2017 年 2 月 2 日
Now it works :).. thx
John Chilleri
John Chilleri 2017 年 2 月 2 日
Awesome! Glad you figured it out!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by