use function for and if via matlap
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
50 60 -2 -15 100
1- find the sum of a set of five different numbers
2- find the sum of negative numbers
3-find how many numbers are more than 40 and less than 90
1 commentaire
Image Analyst
le 6 Mai 2023
To learn such very fundamental concepts, invest 2 hours of your time here:
Réponse acceptée
Atsushi Ueno
le 6 Mai 2023
nms = [50 60 -2 -15 100];
sum(nms) % 1- find the sum of a set of five different numbers
sum(nms(nms < 0)) % 2- find the sum of negative numbers
sum(nms > 40 & nms < 90) % 3-find how many numbers are more than 40 and less than 90
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox 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!