Second output argument as input argument

조회 수: 3 (최근 30일)
Mats
Mats 2012년 1월 30일
Is it possible to combine the two lines:
[~,b] = myfunction(x);
c = myfunction2(b);
Something like: c = myfunction2(myfunction(x){2}) ??

채택된 답변

Walter Roberson
Walter Roberson 2012년 1월 30일
There is no MATLAB syntax or built-in function that supports what you want to do, unfortunately.
  댓글 수: 1
Daniel Shub
Daniel Shub 2012년 1월 30일
See: http://www.mathworks.com/matlabcentral/answers/1325-what-is-missing-from-matlab#answer_1931

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2012년 1월 30일
create function myfunctionMore:
function out = myfunctionMore(x)
[~,out] = myfunction(x);
and below
c = myfunction2(out);
c = myfunction2(myfunctionMore(x))

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by