Filter löschen
Filter löschen

Second output argument as input argument

2 Ansichten (letzte 30 Tage)
Mats
Mats am 30 Jan. 2012
Is it possible to combine the two lines:
[~,b] = myfunction(x);
c = myfunction2(b);
Something like: c = myfunction2(myfunction(x){2}) ??

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Andrei Bobrov
Andrei Bobrov am 30 Jan. 2012
create function myfunctionMore:
function out = myfunctionMore(x)
[~,out] = myfunction(x);
and below
c = myfunction2(out);
c = myfunction2(myfunctionMore(x))

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by