Mostrar comentarios más antiguos
Hi!
Have a short question :-)
I have the following code:
test = [1 2 3 4];
test = foo(test);
foo looks like this:
function [test, out] = foo(test)
out = 5;
test = foo(test) then return [1 2 3 4] not [1 2 3 4 5] which I thought it would do! What is it I do wrong here?!
One more thing:
If I write like this
function [test; out] = foo(test)
out = 5;
A ; instead of , Matlab gives me a syntax error, why?
Thanks!
Micke
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!