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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by