Optionally create plots inside function

조회 수: 17 (최근 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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by