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!