Plot command is sorting the vector from low to high instead of placement order

I have a vector being pulled in by a formula when it does the equations I get this:
Columns 1 through 10
4330.1 7520.7 10711 13902 17093 20283 23474 26664 29855 33046
Columns 11 through 20
36236 39427 42618 45808 48999 52189 55380 58571 61761 64952
Then when I plot the called vector I am getting a linear line (please see attached picture) I am calling the plot with this plot([l],[f])
What can I do to get the numbers to pull in as they show up in the array on not linear?

1 Comment

"What can I do to get the numbers to pull in as they show up in the array on not linear?"
The difference between your data and a straight line are much less than one pixel on anyone's monitor.
If you want humans to see the non-linearity, then you will have to accentuate it, e.g.
  • detrend, plot the deviation.
  • detrend, scale, retrend, plot the "scaled" data.

Sign in to comment.

Answers (1)

your values are 3090 or 3091 apart. To the resolution of the plot, they are a straight line.

Products

Asked:

on 24 Mar 2021

Commented:

on 24 Mar 2021

Community Treasure Hunt

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

Start Hunting!