Function outputs
Function outputs
(OP)
Hi,
I was working with some Matlab and all was well, till all my m-files just stopped outputting what they were supposed to. Now I just get "ans= whatever" even if there are supposed to be 4 outputs.
how can I fix this?
Haven't used Matlab in quite a while and am rusty...
Thanks!





RE: Function outputs
If you have a function with 4 outputs you need to call it with
"[output1 output2 output3 output4] = myfunc(x,y,z)"
"output = myfunc(x,y,z)" will just return output=output1
M
--
Dr Michael F Platten
RE: Function outputs
Thanks Mikey,
I am trying to catch up.
Thing is, the function is built properly (I got it off the mathworks site), and it DID work before.
I've even stepped through each line to see that it's ok. The data is all there it just deosn't create the output variables...
Thanks again,
Daphne