I can't call this function from the command window. The function is meant to output values and plot graphs from a data file.
古いコメントを表示
function [C Gouws,19114656,UTS,E,H,n] = HW1_19114656(filename, Sy)
The error when calling this function is "Error: File: HW1_19114656.m Line: 1 Column: 19 Unexpected MATLAB expression."
How do I call the funtion from the command window and is the function name set correctly?
回答 (1 件)
James Tursa
2018 年 2 月 22 日
Don't put literal values in the output of a function definition line. Use a variable instead. E.g.,
function [C Gouws,19114656,UTS,E,H,n] = HW1_19114656(filename, Sy)
should be
function [C Gouws,output2,UTS,E,H,n] = HW1_19114656(filename, Sy)
% your code here
output2 = 19114656;
end
カテゴリ
ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!