フィルターのクリア

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