Why am I getting "not enough input arguments?"
이전 댓글 표시
I have a main script and it is using a function like so:
shape=input('What was the shape of the final graph? Enter either square, circle, figure_eight: ')
Final_Data=Save(shape);
FUNCTION FILE:
function [T] = Save(shape)
%SAVE Summary of this function goes here
% Detailed explanation goes here
if shape==square
xT=[xQ1,xQ2,xQ3,xQ4]';
yT=[yQ1,yQ2,yQ3,yQ4]';
T=[xT,yT];
fid=fopen('Final2.dat','w');
save Final2.dat T -ascii -single
st=fclose(fid);
elseif shape==circle
xT=[xQ1,xQ2,xQ3,xQ4]';
yT=[yQ1,yQ2,yQ3,yQ4]';
T=[xT,yT];
fid=fopen('Final2.dat','w');
save Final2.dat T -ascii -single
st=fclose(fid);
else shape=figure_eight
xT=[xQ1,xQ2]';
yT=[yQ1,yQ2]';
T=[xT,yT];
fid = fopen('Final2.dat','w');
save Final2.dat T -ascii -single
st=fclose(fid);
end
end
Every time I run it I keep getting the error "not enough input arguments." Please help.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!