How to plot two column vector on the same scale

Hi,
I want to plot to compare actual&modle values on the same scale with titles:
Actual model
1.22 1.01
2.31 2.31
4.12 4.13
1.74 1.78
1.30 1.04
3.13 3.13
3.76 3.76
4.12 4.11
But, I am trying to plot, I am unable to plot (because I don't have x-axis values, my X-axis is just a data count)

 採用された回答

KSSV
KSSV 2017 年 10 月 17 日

1 投票

data = [1.22 1.01
2.31 2.31
4.12 4.13
1.74 1.78
1.30 1.04
3.13 3.13
3.76 3.76
4.12 4.11];
plot(data)
legend('legend','model')
It doesn't matter, you can plot w.r.t to indices.

3 件のコメント

Mekala balaji
Mekala balaji 2017 年 10 月 17 日
Sir,
I want to specify two line with different symbol &color and join by dotted line
KSSV
KSSV 2017 年 10 月 17 日
figure
hold on
plot(data(:,1),'*-r')
plot(data(:,2),'O-b')
legend('legend','model')
REad about plot
Mekala balaji
Mekala balaji 2017 年 10 月 17 日
Thanks Sir.

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

その他の回答 (0 件)

質問済み:

2017 年 10 月 17 日

コメント済み:

2017 年 10 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by