how to plot the graph for the following data with respect to x axis and y axis.

3 ビュー (過去 30 日間)
Prabha Kumaresan
Prabha Kumaresan 2018 年 3 月 5 日
コメント済み: Rik 2018 年 3 月 5 日
X axis data (2,4,6,8,10) y axis data(1.35,4.16,4.12,4.83,4.35)
could anyone help me to do this.

採用された回答

YT
YT 2018 年 3 月 5 日
You can plot it easily like so:
x_data = [2,4,6,8,10];
y_data = [1.35,4.16,4.12,4.83,4.35];
plot(x_data,y_data);
You can check the options for plot by typing help plot in the command window
  2 件のコメント
Prabha Kumaresan
Prabha Kumaresan 2018 年 3 月 5 日
thanks i got the graph and i have attached it. In that graph the data to be plotted in the x axis are (2,4,6,8,10) but i am getting( 2,3,4,5,6,7,8,9,10).how to remove 3,5,7,9.
Rik
Rik 2018 年 3 月 5 日
To clarify: the x-tick have no real connection with the data you plotted. If you had plotted x_data = [2.5,4.5,6.5,8.5,10.5];, you would still see the same integers as the x-tick labels.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by