Analysing mutiple structures of data
古いコメントを表示
Hi,
I am fairly new to the MATLAB environment so please try to tolerate my incompetence :)
I have about 600 data sets of casts that measure water temperature and salinity through depth at different times in struct format.
I have written a script that calculates freezing temperature, depth, what depth freezing temperature and water temperature meet etc and it works fine on a single struct when loaded into the workspace.
But I want to analyse all 600 data sets and create a vector of depths where freezing point and temperature meet so I can plot this over time.
I have little to no programming experience but I'm thinking I can achieve this with a for or loop statement?
Any insight or help would be appreciated.
Cheers,
Ben
8 件のコメント
Ben
2011 年 12 月 13 日
Fangjun Jiang
2011 年 12 月 14 日
See update.
Ben
2011 年 12 月 14 日
Fangjun Jiang
2011 年 12 月 14 日
That's good. You just need to pre-allocate the Maxdepth and then use Maxdepth(i) whereever you use Maxdepth.
N=length(files)-2;
Maxdepth=zeros(N,1);
for i=1:N
...
MaxDepth(i)=...
end
Ben
2011 年 12 月 14 日
Fangjun Jiang
2011 年 12 月 14 日
It looks good for me, although I don't understand the rest of the code, for example, curveintersect(). You can use profile() to see where is the bottle neck.
Ben
2011 年 12 月 14 日
Ben
2011 年 12 月 14 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Downloads についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!