I have an array for y-values and one for x-values, the x-values don't stat from 0, How to plot this?

3 ビュー (過去 30 日間)
Suppose x = [204, 204.5, 205, 205.5, 206, 206.5, 207] and corresponding y = [2, 2.5, 1.33, 1.85, 2.99, 3.2, 2.44]
How do I plot y corresponding to these x values and show the proper values in axis??

採用された回答

ME
ME 2019 年 11 月 15 日
Assuming that you want these x values to be the ones displayed on the x-axis then it's as simple as:
plot(x,y)
  1 件のコメント
Ritabrata Chakraborty
Ritabrata Chakraborty 2019 年 11 月 16 日
Thanks a lot. I was trying with xlim, axis from the begining and getting errors. This worked perfectly.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by