Plotting all the columns of a matrix
31 ビュー (過去 30 日間)
古いコメントを表示
Vinay Killamsetty
2019 年 8 月 29 日
コメント済み: KALYAN ACHARJYA
2019 年 8 月 29 日
Hi,
I want to plot columns of two matrices Z_imag and Z_real in two separate graphs.
I tried to do this code but I wasnt able to:
Z_imag=randi(10,10,3);
Z_real=randi(10,10,3);
width_mil=1:10
for i=1:1:3
figure(1)
Z_im = axes;
plot( Z_im,width_mil,Z_imag(:,i),'-o');
title('Imaginary part of the impedance');
xlabel('W [mil]');
ylabel('Im{Z}');
figure(2)
Z_re = axes;
plot(Z_re,width_mil,Z_real(:,i),'-o');
title('Real part of the impedance');
xlabel('W [mil]');
ylabel('re{Z}');
end
2 件のコメント
the cyclist
2019 年 8 月 29 日
Can you upload your data in a MAT file, so that we can execute your code?
採用された回答
KALYAN ACHARJYA
2019 年 8 月 29 日
I want to plot columns of two matricesZ_imag and Z_real in two separate graphs.
I assumed, stack bar plot of individual column elements:
matricesZ_imag=rand(4,5);
Z_real=randi(10,4,5)
figure,bar(matricesZ_imag','stacked');
figure,bar(Z_real','stacked');
10 件のコメント
その他の回答 (1 件)
madhan ravi
2019 年 8 月 29 日
編集済み: madhan ravi
2019 年 8 月 29 日
No loops needed:
plot(mat)
axis([0,5,0,5])
1 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!