Plot time-series data

2 ビュー (過去 30 日間)
Phuong Que Tran
Phuong Que Tran 2024 年 4 月 16 日
編集済み: KSSV 2024 年 4 月 16 日
I have a 1000x501 table in which the 1st column is wavelength and the rest are the run number when I do the experiment. How can I plot it as the example below? I want the x is wavelength, y is run number and color for the value of y. Thanks~

回答 (1 件)

KSSV
KSSV 2024 年 4 月 16 日
編集済み: KSSV 2024 年 4 月 16 日
Let A be your table.
wavelength = A(:,1) ;
Time = 1:size(A,2)-1 ;
data = A(:,2:end) ;
h = pcolor(wavelength,Time,data') ;
h.EdgeColor = 'none' ;
xlabel('Wave length')
ylabel('Time')
Also have a look on heatmap

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by