MATLAB Answers

0

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

Asked by Ritabrata Chakraborty on 15 Nov 2019 at 14:57
Latest activity Commented on by Ritabrata Chakraborty on 16 Nov 2019 at 15:51
Accepted Answer by ME
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??

  0 Comments

Sign in to comment.

Products


Release

R2017b

1 Answer

Answer by ME
on 15 Nov 2019 at 15:22
 Accepted Answer

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 Comment

Thanks a lot. I was trying with xlim, axis from the begining and getting errors. This worked perfectly.

Sign in to comment.