How to replace certain array values using if, for or while?
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!