plot many channels with same x axis and repeated y axis values

5 ビュー (過去 30 日間)
Enzo
Enzo 2022 年 10 月 30 日
編集済み: Jan 2022 年 11 月 1 日
Hello Everyone,
I would like to know which method could be the best in order to get an image like the one in the attachments
it represent a linear probe that goes deep into the brain surface, whith 16 channels in Y axis. As you could see, each channels displays different values, but they share the same x-y axis range.
i have a matrix with 2000 time points filled with values x 16 channels. I would like to get an image close to the one displayed, plus the function should make easy to change the range of channels displayed (16 now and then 5 channels only)
Thanks so much in advance
  1 件のコメント
VBBV
VBBV 2022 年 10 月 31 日
You can also use stackedplot function given in following link
for similar output

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

採用された回答

Jan
Jan 2022 年 10 月 30 日
X = rand(20, 200); % Some test data
XX = X + (0:19).'; % Shift vertically
plot(1:200, XX)
  5 件のコメント
Enzo
Enzo 2022 年 10 月 31 日
it worked so nice! thanks @Jan!
just one more question. i should label with vertical dotted lines many time point in the x axis which represent trigger events. how could I proceed?
Jan
Jan 2022 年 11 月 1 日
編集済み: Jan 2022 年 11 月 1 日
X = rand(20, 200); % Some test data
XX = X + (0:19).'; % Shift vertically
plot(1:200, XX);
YL = get(gca, 'YLim');
T = rand(1, 20) * 200; % Some time points
line([T; T], YL, 'LineStyle', ':', 'Color', 'k', ...
'LineWidth', 1.5);

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by