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

1 回表示 (過去 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 ExchangeData Type Conversion についてさらに検索

タグ


Translated by