Receiving 'not enough input arguments' in code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I keep receiving error message on line 4 " not enough input arguements", not sure how to rectify.
function D=areavol(A)
format
D= 0; % where D=parallelogram
if size(A,2)== 2
D=1;
end
Rank =rank(A); %get rank
[rows,~]=size(A); % get rows
if rows>rank
if D==1
printf("parallelogram can't be built.\n")
else
printf("parallelpiped can't be built.\n")
end
D=0;
return;
end
>> areavol
Not enough input arguments.
Error in areavol (line 4)
if size(A,2)== 2
0 comentarios
Respuestas (1)
the cyclist
el 17 de Feb. de 2020
Editada: the cyclist
el 17 de Feb. de 2020
You need
rows>Rank
instead of
rows>rank
MATLAB is case-sensitive. It would be better to have named that variable something that is not a keyword (despite the different case). Then it would have been easier to catch that mistake (or never have made it in the first place).
Also, note that in the editor, MATLAB will have warned you (with a squiggly yellow line) that the variable Rank was never used.
0 comentarios
Ver también
Categorías
Más información sobre Orange en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!