Plot each individual cells in different graphs

1 回表示 (過去 30 日間)
Jonathan Cheong
Jonathan Cheong 2021 年 3 月 15 日
コメント済み: Jonathan Cheong 2021 年 3 月 15 日
Hello, I have a two cell arrays I would like to plot as individual graphs. And be able to show them whenever I need to.
X-axis = 'datecell.mat'
Y-axis = 'smcell.mat'
The code I have averages everything onto one graph. But I'd like to split them up.
figure(2)
for ci = 1:length(finalindex)
ddplots{ci} = plot(datecell{ci},smcell{ci});
ylim = ([smcell{ci}]);
end
legend
Many thanks.

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 3 月 15 日
編集済み: KALYAN ACHARJYA 2021 年 3 月 15 日
datecell=load('datecell.mat');
datecell=datecell.datecell;
smcell=load('smcell.mat');
smcell=smcell.smcell;
figure,
for ci= 1:length(datecell)
plot(datecell{ci},smcell{ci});
hold on;
end
grid on;
Or
datecell=load('datecell.mat');
datecell=datecell.datecell;
smcell=load('smcell.mat');
smcell=smcell.smcell;
for ci= 1:length(datecell)
figure,plot(datecell{ci},smcell{ci});
end
grid on;
Note: Few cases, there are empty cell elments
  1 件のコメント
Jonathan Cheong
Jonathan Cheong 2021 年 3 月 15 日
Thanks for the help. Yea, I'll be removing the empty cells.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by