How can I use pcolor for cell array

I really appriceiate help me to plot attached file for cell format. Thanks in advance.
figure
pcolor(datenum(Time),-PRES,TEMP);shading flat;colorbar
set(gca,'Color',[0.5 0.5 0.5]);
colormap(jet)

3 件のコメント

Walter Roberson
Walter Roberson 2020 年 4 月 9 日
pcolor cannot be used for cell arrays.
You can consider cellfun to invoke pcolor on each member of the cell, but unless you were careful they would all appear on top of each other hiding the earlier ones below the later ones.
Farshid Daryabor
Farshid Daryabor 2020 年 4 月 9 日
I can use cellfun to invoke function attached, but I don't know how, it should be something like this?
plot_fig = cellfun(@hovmoller_plot, Time, PRES,TEMP , 'uni', 0 )
Walter Roberson
Walter Roberson 2020 年 4 月 9 日
You could probably use something like that, but your cell arrays have 358 entries, and you have a figure() call there, so you would end up making 358 figures. Is that what you wanted?

サインインしてコメントする。

回答 (0 件)

カテゴリ

タグ

質問済み:

2020 年 4 月 9 日

コメント済み:

2020 年 4 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by