Extracting data from .mat file
3 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone, I have received a *.mat file from my supervisor that contains 4 tables. every table is constructed on hourly based data from a power generator, 24 hours a day and 365 days a year. so it (24*365)= 8760x1 table. that the properties of the table ''Time vector characteristics
Length 8760
Start date 01-Jan-2006 01:00:00
End date 01-Jan-2007 00:00:00
''
I need to extract data from the table in such form that I re-arrange it into 365x24 matrix so that every row show data for 1 day with 24 hours.
0 件のコメント
採用された回答
Mitch Martelli
2012 年 11 月 28 日
Sorry i dont understand well your question
to extract the data you can try to use getEntry, documentation are reported in the link below :
Moreover if i understand well your aim reshape(xxx,365,24) dont give you what you want.
B = reshape(xxx,24,365);
B=B';
その他の回答 (2 件)
Mitch Martelli
2012 年 11 月 28 日
Hi, You can use the reshape function.
Example :
data=rand(8760,1)
B = reshape(data,24,365);
B=B';
Regards
M1tC4
0 件のコメント
Image Analyst
2012 年 11 月 28 日
What is stored in the mat file? Is it a structure with a cell array with 4 cells, and inside each cell is another cell array that is the table? So basically in other words there are 4 tables. And each table is an (N rows) by (3 columns) cell array where each of those cells contains a string? Because that's what you're showing. Can you do this and tell us what shows up in the command window:
storedStructure = load(yourMatFileName);
whos storedStructure
storedStructure
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!