I run this identity test and get this response....what am I doing wrong
1 回表示 (過去 30 日間)
古いコメントを表示
function result = singularitytest(A)
d = det(A);
c = cond(d) <= 1e-10;
end
Output argument "result" (and maybe others) not assigned during call to "singularitytest".
0 件のコメント
回答 (1 件)
Stephen23
2017 年 9 月 9 日
編集済み: Stephen23
2017 年 9 月 9 日
You define a function with one output argument result:
function result = singularitytest(A)
Inside the function you define several variables, but you do not define result anywhere. Thus the error: if you do not tell MATLAB what result is, how do you expect it to return anything?
Perhaps you meant to do this:
function result = singularitytest(A)
d = det(A);
result = cond(d) <= 1e-10;
end
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!