error when calling a function inside of another function
Mostrar comentarios más antiguos
I'm very new to matlab function. so sorry if i asked a stupid question. i got an error saying "The expression to the left of the equals sign is not a valid target for an assignment." for the line as:
answer = function2(x,y,z);
in function1. when I run another .m file which call this function1 and this function1 calls function2 like the above. I've tested the function2 at the command line with no error. which returns a (1,3) vector. and in function1, i didn't define the variable "answer". I tried to modify the function2 to make it return 3 output variable with each being a scalar and even reduce the function2 output to only one scalar output, it still gave the same error. could anybody give me some help? I really appreciate that.
1 comentario
Walter Roberson
el 6 de Feb. de 2011
Please show us the exact code line. There might be something subtle about what you used.
Respuesta aceptada
Categorías
Más información sobre Interactive Control and Callbacks 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!