Write a Function called Is_decreasing that has the output variables yes_no?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
This Function should accept a row or column vector and determine whether or not the vector is decreasing. It should set yes_no=1 if the vector is decreasing and yes_no=0 if its not. This is what I have.
function [ yes_no ] = Is_decreasing( x )
k=2
while x(k-1)<x(k)
k=k+1;
yes_no=1
end end
0 commentaires
Voir également
Catégories
En savoir plus sur Whos dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!