value assigned to the variable might be unused.

2 visualizaciones (últimos 30 días)
jakaria babar
jakaria babar el 27 de Nov. de 2017
Comentada: jakaria babar el 27 de Nov. de 2017
what's wrong with the variable "v".Please help.
function [s,m,b] = non_decr(v)
v = [x,y,z];
if x<=y && y<=z
[s,m,b]=deal(x,y,z);
elseif x<=z && z<=y
[s,m,b]=deal(x,z,y);
elseif y<=x &&x<=z
[s,m,b]=deal(y,x,z);
elseif y<=z && z<=x
[s,m,b]=deal(y,z,x);
elseif z<=y &&y<=x
[s,m,b] = deal(z,y,x);
else
[s,m,b] = deal(z,x,y);
end
end

Respuesta aceptada

Birdman
Birdman el 27 de Nov. de 2017
Change line
v = [x,y,z];
to
x=v(1);y=v(2);z=v(3);

Más respuestas (0)

Categorías

Más información sobre Surfaces, Volumes, and Polygons en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by