フィルターのクリア

Pcolor of a time-series

2 ビュー (過去 30 日間)
user20912
user20912 2022 年 4 月 14 日
コメント済み: Mathieu NOE 2022 年 4 月 19 日
HI. I have a very long time series which data is:
>> whos dt data1
Name Size Bytes Class Attributes
dt 3285x1 52560 double
data1 3285x1 26280 single
where dt is the dates of 8 years. I have this idea of making a pcolor of this so I've already try the following:
data2 = repmat(data1,[1 2]);
dummy = ones(size(data2,2),1);
Now I have this:
>> whos data2 dummy dt
Name Size Bytes Class Attributes
dt 3285x1 26280 double
data2 3285x2 26280 single
dummy 2x1 16 double
Then, I try a
pcolor(dt,dummy,data2)
But I get a white plot (see the attached image). Is my approach correct? If so, why do I get a white plot?
Thanks in advance.

回答 (1 件)

Mathieu NOE
Mathieu NOE 2022 年 4 月 15 日
hello
I suspect this is the intention - demo on "dummy" data
% dummy data
dt = (1:3285)';
data1 = single(rand(3285,1));
data2 = repmat(data1,[1 2]);
dummy = (1:size(data2,2));
[X,Y] = meshgrid(dt,dummy);
p = pcolor(X,Y,data2');
set(p, 'EdgeColor', 'none');
  2 件のコメント
user20912
user20912 2022 年 4 月 18 日
This actually helps. Thank you
Mathieu NOE
Mathieu NOE 2022 年 4 月 19 日
My pleasure !

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

カテゴリ

Help Center および File ExchangeTime Series Collections についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by