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

2 ビュー (過去 30 日間)
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 件のコメント
Jan
Jan 2013 年 3 月 28 日
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 件のコメント
Redouane Bouchou
Redouane Bouchou 2020 年 4 月 16 日
Thank you very much that was really helpfeul .
edy daher
edy daher 2020 年 7 月 16 日
but if i need it this way z=test(1) + 2 function1(2,3);
how can i get it

サインインしてコメントする。

その他の回答 (1 件)

B. C.
B. C. 2013 年 12 月 4 日
I just had this problem, thanks Matt!

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by