How can i code for problems which have range
Afficher commentaires plus anciens
hello there friends previously i have posted here and its been a great help...Today i want to ask regarding how to code for range values ...Example :-0.3<x<0.3.I understood that i need to use for or If loop for this and the general syntax for loop is
for variable =c:g:h
statements
end
so i tried something like this
for dn=1:1:365
if (-0.3>sdelta)&&(sdelta<0.3)
fprintf('number of days : %d',dn)
end
end
but i couldnt get the desired output.Can anyone help me out or guide me ?Thank You.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!