How to replace certain array values using if, for or while?
Show older comments
I have this 45x10 array with vallues between 0 and 2.5, I want to replace those values with letters if certain conditions are being atended.
The conditions are:
If the value is greater than 1.6, it gets grade E... if the value is greater than 1 and less than 1.6, it will receive a D grade... If the value is greater than 0.63 and less than 1, it receives a grade of C... If the value is greater than 0.315 and less than 0.63, it receives a grade of B...And finally, if the value is less than 0.315, it receives an A grade.
It can also be grades between 2 and 10 following the same ones I showed earlier (E=2, D=4, C=6, B=8 and A=10), but it would be better if the letters were used.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!