How to capture function output from MATLAB?

I have a simple function

function increase(percent, number)

    low = number - number*percent;

end

I want to go back to a minimum, so I can use it as an argument for another function

mitoGen(asp, arg, increase(0.2, 234), glu)

Is there any way to do this?

+1
source share
1 answer

In this way:

function low = increase(percent, number)
  low = number - number*percent;
end

You can also return multiple elements by specifying more than one character to the left of the equal sign:

function [out1, out2] = foo(bar, baz)
+11
source

Source: https://habr.com/ru/post/1791083/


All Articles