How to plot multiple points on the same graph with changing values of parameters for each iteration?

1 回表示 (過去 30 日間)
Priya
Priya 2014 年 6 月 9 日
編集済み: Priya 2014 年 8 月 6 日
Hi,
I need to plot s_x vs. f_x where f_x keeps changing for each iteration . Hence f_x must be plotted against s_x for every one percentage increase in the value of s_x. Obviously this would show a dot on the graph. But I need to get a curve with all the dots together, everytime when f_x changes with a percent increase in s_x.
Please do help me on plotting them and let me know if I have to explain more.
Thanks

回答 (1 件)

Image Analyst
Image Analyst 2014 年 6 月 9 日
I'm not sure where the difficulty lies. Just call plot, put hold on, and keep plotting new data. What's the problem? Did you forget to call "hold on"?
  2 件のコメント
Image Analyst
Image Analyst 2014 年 6 月 9 日
What are you doing to change f_x at every iteration? To me, it looks like it's the same value every time.
Image Analyst
Image Analyst 2014 年 6 月 10 日
So f_x is a table? If so, and you want the dry column, you can extract it via:
dryData = f_x.dry;
Then in the loop, use dryData(i) instead of f_x. If f_x is not a table data type, then you'll need to do something else but I can't exactly tell what f_x is in your code.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by