0

As stated, I would only need one of the output from a function that returns many outputs.

A quick example:

function [out1, out2] = myFunction (input)
out1=input+1;
out2=input+2;
end

In my other script, I need the out2 only. How should I format in such a way that it returns me out2?

Thank you in advance!

1 Answers1

1

Use something like this

  [~, out] = myFunction(input)
lmNt
  • 3,822
  • 1
  • 16
  • 22