when this error comes----'Output argument "f" (and maybe others) not assigned during call to'

I am abit new to matlab.. wnat to know when i get an error of this type.. "Output argument "f" (and maybe others) not assigned during call to..." Any answer will be of great help..

댓글 수: 1

Please post the line, which causes the error also. Then we do not have to guess the details for an answer. Thanks.

댓글을 달려면 로그인하십시오.

 채택된 답변

Matt J
Matt J 2013년 3월 28일
편집: Matt J 2013년 3월 28일
It means you called a function and requested an output that was never created in the workspace of the function. Here's a simple example
function out=test(in)
in+1; %out not created
end
Now if I do the following, I get an error because I've asked for an output 'z', but a value for this is never created inside the function
>> z=test(1)
Error in test (line 3)
in+1; %out not created
Output argument "out" (and maybe others) not assigned during call to "C:\Users\mjacobson\Documents\mwjtree\test\test.m>test".
Notice, however, that calling the function without output arguments
>> test(1)
gives no errors.

댓글 수: 2

Thank you very much that was really helpfeul .
but if i need it this way z=test(1) + 2 function1(2,3);
how can i get it

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

질문:

2013년 3월 28일

댓글:

2020년 7월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by