How to split .mat file data into different variables?

조회 수: 6 (최근 30일)
Faheem Ur Rehman
Faheem Ur Rehman 2021년 4월 14일
댓글: David Hill 2021년 4월 15일
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.?

채택된 답변

David Hill
David Hill 2021년 4월 14일
a=readmatrix('yourData');
m=reshape(a,1024,[]);%why not just keep in a matrix that you can index into?
  댓글 수: 2
Faheem Ur Rehman
Faheem Ur Rehman 2021년 4월 15일
Thank you its work.
How i save each column?
David Hill
David Hill 2021년 4월 15일
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 ...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by