Info

This question is closed. Reopen it to edit or answer.

how to call one result from multiple value returned function

2 views (last 30 days)
[a,b]=function1(x1,x2) ...
what if i want to only get the first return value in function1 (i.e. value of a). Then plug "a" into my following function instead of [a,b]:
[c,d]=function2(@function1,x1=2,x2=2) how to revise this command?
Thanks!
  1 Comment
pfb
pfb on 12 Apr 2015
Hi,
so you have a function2 whose first argument is a function.
Are you getting an error? If this is the case, what is it?
I'm not sure about the syntax you're using, when you write x1=2, x2=2 in the 2nd and 3rd argument of function2. Could that be the problem?
I'm assuming you did not write function2, otherwise you might change it according to your need.

Answers (0)

Community Treasure Hunt

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

Start Hunting!