The function return value might be unset error

1 Commento

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?

Accedi per commentare.

Risposte (1)

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.

Categorie

Scopri di più su Programming in Centro assistenza e File Exchange

Prodotti

Release

R2019b

Richiesto:

il 2 Mag 2020

Risposto:

il 2 Mag 2020

Community Treasure Hunt

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

Start Hunting!

Translated by