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 件のコメント
Stephen23
2021 年 3 月 24 日
"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.
回答 (1 件)
Walter Roberson
2021 年 3 月 24 日
0 投票
your values are 3090 or 3091 apart. To the resolution of the plot, they are a straight line.
カテゴリ
ヘルプ センター および File Exchange で Line Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!