I am getting a Error using alpha (line 68) Wrong number of arguments and was wondering if anyone could help me out because i am not sure what its saying.

3 visualizzazioni (ultimi 30 giorni)
alpha in degree
range=0:15:360;
Y=sind(range);
Table=[range;Y]';
disp('HW #6 - Evan Melanson');
disp('Problem #2');
VarNames = {'aplha (degrees)', 'sin(aplha)'};
fprintf(1, ' %s\t%s\t\n', VarNames{:});
fprintf(1, '\t%.1f\t%.4f\n', Table');
plot(range,Y);
title('sin(alpha) vs alpha');
xlabel('alpha (degrees)');
ylabel('sin(alpha)');
grid on
%if you get it to work thank you!

Risposte (1)

Stephen23
Stephen23 il 18 Nov 2021
Modificato: Stephen23 il 18 Nov 2021
% alpha in degree <<<<<< This needs to be a comment, not code.
range=0:15:360;
Y=sind(range);
Table=[range;Y]';
disp('HW #6 - Evan Melanson');
HW #6 - Evan Melanson
disp('Problem #2');
Problem #2
VarNames = {'aplha (degrees)', 'sin(aplha)'};
fprintf(1, ' %s\t%s\t\n', VarNames{:});
aplha (degrees) sin(aplha)
fprintf(1, '\t%.1f\t%.4f\n', Table');
0.0 0.0000 15.0 0.2588 30.0 0.5000 45.0 0.7071 60.0 0.8660 75.0 0.9659 90.0 1.0000 105.0 0.9659 120.0 0.8660 135.0 0.7071 150.0 0.5000 165.0 0.2588 180.0 0.0000 195.0 -0.2588 210.0 -0.5000 225.0 -0.7071 240.0 -0.8660 255.0 -0.9659 270.0 -1.0000 285.0 -0.9659 300.0 -0.8660 315.0 -0.7071 330.0 -0.5000 345.0 -0.2588 360.0 0.0000
plot(range,Y);
title('sin(alpha) vs alpha');
xlabel('alpha (degrees)');
ylabel('sin(alpha)');
grid on

Categorie

Scopri di più su App Building in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by