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!