Plot one row of x with multi rows of Y

1 次查看(过去 30 天)
I have something like this values 25 is the X and remaing four values after that consitutes Y ..similarly for 50,100 ..250etc..how shall i pplot all these togetther.such like i get corresponding maps for each set of X.
25 646 490 700 669
50 1530 1388 1500 1666
75 2586 3260 882 1704
100 4411 4415 2419 2142
125 3002 2142 3409 3000
150 2027 1923 1339 1041
175 1250 2678 3260 3125
200 1388 2272 2678 1704
225 1339 2419 2884 1785
250 1470 2777 3260 1744
  2 个评论
KSSV
KSSV 2020-9-14
Use plot. Wjat you expect actually?
Ramesh Bala
Ramesh Bala 2020-9-14
y1 = [25 646 490 700 669 ]; i have like this where the plot shows error

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2020-9-14
bar(YourMatrix(:,1), YourMatrix(:,2:end))
  6 个评论
Ramesh Bala
Ramesh Bala 2020-9-14
oh thanks ! yes you are right,I tried but it was not clear as they are not equal in nature and giving wrong plots.
Thanks again !

请先登录,再进行评论。

更多回答(1 个)

VBBV
VBBV 2020-9-14
编辑:Walter Roberson 2020-9-14
X= 25:25:100;
Y = [646 490 700 669;1530 1388 1500 1666;2586 3260 882 1704;4411 4415 2419 2142];
bar(X,Y,'stacked');
I just shown upto 4 rows here you can add as the number of rows you want

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by