Second output argument as input argument

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일

0 개 추천

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일

0 개 추천

create function myfunctionMore:
function out = myfunctionMore(x)
[~,out] = myfunction(x);
and below
c = myfunction2(out);
c = myfunction2(myfunctionMore(x))

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

질문:

2012년 1월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by