Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
where is the error ?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
function [ vmin ] = mini(vect)
%MINI retourne le minimum d’un vecteur
n = numel(vect);
if n == 0
vmin = [];
else
vmin = vect(1);
for k = 2:n
if vect(k) < vmin
vmin = vect(k);
end
end
end
end
function [ vmax ] = maxi(vect)
%MAXI retourne le maxiimum d’un vecteur
n = numel(vect);
if n == 0
vmax = [];
else
vmax = vect(1);
for k = 2:n
if vect(k) > vmax
vmax = vect(k);
end
end
end
end
8 Kommentare
Walter Roberson
am 2 Dez. 2018
defining the variable in the base workspace is not enough .you need to go to the command line and
mini(v)
Diese Frage ist geschlossen.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
