How to output a figure from a function?

조회 수: 17 (최근 30일)
Darcy
Darcy 2013년 3월 21일
Is there a way to output a figure from a function?
I have:
figure(1);plot(x,y)
figure(2);plot(y,z)
Is it possible to create a function that, when called, displays these figures as figure 1 and figure 2?
Any help is appreciated. Thanks

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 21일
function curv(x,y,z)
figure(1);plot(x,y)
figure(2);plot(y,z)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by