フィルターのクリア

how to plot each row of the matrix

58 ビュー (過去 30 日間)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018 年 8 月 2 日
コメント済み: Star Strider 2018 年 8 月 2 日
Dear All, I have a matrix called Single, it is composed of 365 rows and 39 columns, I need to plot each row in the same graph, meaning I need the same graph to have 365 plots. how can I please do that? my code is the following and it is not working:
for K = 1:length(Single)
plot(Single{K});
xlabel('Load in Kips');
ylabel('Percentage');
hold on
end
title('Single')

採用された回答

Star Strider
Star Strider 2018 年 8 月 2 日
編集済み: Star Strider 2018 年 8 月 2 日
Try this:
Single = sin((1:365)'*(1:39)*2*pi/3650); % Create Data
figure(1)
plot(Single') % Without Independent Variable
grid
xlabel('Load in Kips')
ylabel('Percentage')
xv = linspace(0, 1, size(Single,2));
figure(2)
plot(xv, Single) % With Independent Variable
grid
xlabel('Load in Kips')
ylabel('Percentage')
EDIT Added axis labels.
  2 件のコメント
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018 年 8 月 2 日
thank you very much it worked
Star Strider
Star Strider 2018 年 8 月 2 日
As always, my pleasure.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by