The function return value might be unset error

8 ビュー (過去 30 日間)
Abdullah Nabi
Abdullah Nabi 2020 年 5 月 2 日
回答済み: Image Analyst 2020 年 5 月 2 日
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 5 月 2 日
The message appears to be correct to me. You do not store anything into a variable named sol anywhere inside calcall. What value should be returned by the function?

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

回答 (1 件)

Image Analyst
Image Analyst 2020 年 5 月 2 日
You don't seem to use sol, so just get rid of it:
function calcall(t)
Or else set it to something
function sol = calcall(t)
sol = zeros(1, 4); % Initialize it to something in case of error afterwards.
% Computations for ave, mx, mn, st ... then
sol = [ave, mx, mn, st];
or whatever you want to return.
And disp() displays in the command window, not onto the figure you created.

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by