필터 지우기
필터 지우기

Extracting data from .mat file and then adding up results to form a new .mat file

조회 수: 1 (최근 30일)
Hello,
I have a query regarding data extraction. I got a .mat file with data (365rows representing days, 12columns representing hours). I would like to read these data (I did that). Concern is that for each day, I want the 12 values as columns so that I can have 365x12 rows and 2 columns.
Any help would be highly appreciated.
Thanks

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 2월 14일
편집: Azzi Abdelmalek 2016년 2월 14일
If A is your matrix, you can get one column with reshape function
B=reshape(A',[],1)
In your question, I don't know what the second column is ?
  댓글 수: 7
Alex
Alex 2016년 2월 14일
Thanks Walter for the reply. Yes, I want that 12 values for 1 day to be repeated in column format. In that case, I would be having 4380x2 matrix. Hope I'm clear about it.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by