Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I'm trying to write a script file that compares the data from two different function files. As soon as I attempt to plot the data I get the error message "too many output arguments'. Why?

조회 수: 2 (최근 30일)
The function files run fine separately, and they return the correct values when i run the script file. However it can't seem to plot the values, I've attempted to name the values returned by the separate functions but it doesn't help. e.g
T=20:10:150;
[r1] = MyFunction1(T);
[r2] = MyFunction2(T);
subplot(2,1,1)
plot(T,r1)
subplot(2,1,2)
plot(T,r2)
  댓글 수: 4

답변 (1개)

Steven Lord
Steven Lord 2017년 7월 10일
Are you certain that you've defined each of MyFunction1 and MyFunction2 to return at least one output argument? For example, you would receive the error you quoted if you attempted to call the clc function (which is defined to have 0 output arguments) with an output argument.
Q = clc % WILL throw an error

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by