Plot command is sorting the vector from low to high instead of placement order
Afficher commentaires plus anciens
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 commentaire
Stephen23
le 24 Mar 2021
"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.
Réponses (1)
Walter Roberson
le 24 Mar 2021
0 votes
your values are 3090 or 3091 apart. To the resolution of the plot, they are a straight line.
Catégories
En savoir plus sur Correlation and Convolution dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!