error when calling a function inside of another function
显示 更早的评论
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 个评论
Walter Roberson
2011-2-6
Please show us the exact code line. There might be something subtle about what you used.
采纳的回答
更多回答(2 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!