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

3 Ansichten (letzte 30 Tage)
Eliane Truccolo
Eliane Truccolo am 2 Feb. 2017
Kommentiert: John Chilleri am 2 Feb. 2017
I have a matrix (.mat) with two columns and I want to insert a line of NaN at the end of matrix...

Akzeptierte Antwort

John Chilleri
John Chilleri am 2 Feb. 2017
Bearbeitet: John Chilleri am 2 Feb. 2017
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 Kommentare
Eliane Truccolo
Eliane Truccolo am 2 Feb. 2017
Now it works :).. thx
John Chilleri
John Chilleri am 2 Feb. 2017
Awesome! Glad you figured it out!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by