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

2 visualizaciones (últimos 30 días)
Eliane Truccolo
Eliane Truccolo el 2 de Feb. de 2017
Comentada: John Chilleri el 2 de Feb. de 2017
I have a matrix (.mat) with two columns and I want to insert a line of NaN at the end of matrix...

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by