Why am I getting "not enough input arguments?"
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!