Optionally create plots inside function

12 ビュー (過去 30 日間)
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013 年 8 月 26 日
I have a function
y=myfun(x)
y=3*x;
plot(x, y)
If x=[1 2 3 4 5]; then the plot will be plotted. Is there anyway to control if I want to make the plot or not?

採用された回答

Image Analyst
Image Analyst 2013 年 8 月 26 日
Yes. Don't call plot() if you don't want it plotted.
  1 件のコメント
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013 年 8 月 26 日
Thank you, exactly what I had in mind.

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

その他の回答 (0 件)

カテゴリ

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