필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Function output in another function?

조회 수: 1 (최근 30일)
Steve
Steve 2011년 10월 10일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello Experts,
For example I have:
function t = test(a)
in this function I use another function test2 but I need all the output of test2: [out1,out2] = test2;
How can I do this, because it doesn't work for me in this way.
Thanks a lot in advance.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 10월 10일
In test2.m
function [out1,out2]=test2;
out1=1;
out2=2;
In test.m
function t=test(a)
[out1,out2]=test2;
t=a+out1+out2;
In Command Window, run
test(0)

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by