How to split .mat file data into different variables?

6 visualizaciones (últimos 30 días)
Faheem Ur Rehman
Faheem Ur Rehman el 14 de Abr. de 2021
Comentada: David Hill el 15 de Abr. de 2021
i have (51200x1) data in mat file in need to extract from (1:1024,1),(1025:2048,1), (2049:3072,1).... and so on. its 50 parts. Each part consist of 1024 column.
How it can be done.?

Respuesta aceptada

David Hill
David Hill el 14 de Abr. de 2021
a=readmatrix('yourData');
m=reshape(a,1024,[]);%why not just keep in a matrix that you can index into?
  2 comentarios
Faheem Ur Rehman
Faheem Ur Rehman el 15 de Abr. de 2021
Thank you its work.
How i save each column?
David Hill
David Hill el 15 de Abr. de 2021
They are all saved in the matrix. Whenever you need a column just index into the matrix.
m(:,1);%is the first column
m(:,2);%second column ...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Types 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