"parse error at '=': usage might be invalid MATLAB syntax." on lines 34 and "parse error at END: usage might be invalid MATLAB syntax" on line 37. Please help! Thanks!
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
0 Kommentare
Antworten (2)
Walter Roberson
am 25 Feb. 2021
You wrote
function = value f(x)
Notice the space between value and f(x)
You probably wanted
function value = f(x)
0 Kommentare
Cris LaPierre
am 25 Feb. 2021
You have used the wrong syntax to declare your function. Expected syntax is
function ave = average(x)
ave = sum(x(:))/numel(x);
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu String Parsing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!