Given a multiple input matlab function
out=f(in1, in2)
I would like to write a second function g which generates the inputs for f, e.g.
[in1, in2]=g(in)
so that I can call something like:
out=f(g(in))
I have tried writing g as a single output function which stores in1 and in2 in a cell array, so that i can feed the output of g to f using the colon operator:
in_c=g(in);
out=f(in_c{:})
but I was looking for a one-line solution, which seems not possible to achieve this way as I read in:
Is it possible to apply colon operator on an expression in MATLAB?
Is there any other way to do this?
f
take a cell array as input, andg
return a cell array as output. – Chris Taylor