(Again) plots do not appear on the graph
古いコメントを表示
I am trying to solve a simple problem. I have a bunch of data in neat little columns. So, if a particular record has the value "Dealer" in it's 'Seller' column, I want that particular record's data to be plotted using blue colored markers and green if the "Seller" column does not have "Dealer" for that particular record.
I hashed out some code, but it is not working. The graph appears, but no plots.
while i < 302
if Seller(i) == "Dealer" % __[1]
plot(year(i), distance(i), '.b') % ___[2]
Hold on;
i = i + 1;
else
plot(year(i), distance(i), '.r')
Hold on;
i = i + 1;
end
end
I have tried using the commands [1] and [2] Individually and they seem to be working but the whole thing does not work at all....
My data is very simple table. distance and year are like ===>
27000
1900
6.900
5.200
....
....
But in seperate columns. Note that the 0's at end are there because I just divided all values by 1000.
Any help?
2 件のコメント
John D'Errico
2020 年 4 月 11 日
You seem to indicate you are asking this again, but I don't see where it was asked before.
Anyway, we don't actually have your data. Just something vaguely related to your data. We don't actually see all of your code, or how you use this.
For example, what was i initially? Did you ever initiaize i?
You talk about neat little columns, but we don't see any columns.
So if you want serious help, you need to seriously show what you are doing, rather than a vague approximation to what you may be doing. Otherwise, anything that is said by us would be just a wild guess.
Neel Gupta
2020 年 4 月 12 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Discrete Data Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
