How to use loops to compare values?
Afficher commentaires plus anciens
Hi all,
I have a set of 20 values that I need to compare with a certain value. How do I use the for loop to compare the values with writing code 20 times?
Thank you
This is what I have done so far:
I have values stored from DiffQ1 to DiffQ20 I need to compare the values Difference = 600 Results = 0
if DiffQ1 > Difference
Results = Results + 0
else
Results = Results + 1
end;
to
if DiffQ20 > Difference
Results = Results + 0
else
Results = Results + 1
end
Réponses (2)
Sachin Ganjare
le 11 Oct 2012
0 votes
Refer the link below:
Hope it helps!!!
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!