How to check for condition without using a loop or if statement.
Show older comments
The problem set up is this: Given vector A, and the average value of the elements in vector A, track the number of times an element in vector A is greater than the average value of elements in A.
The issue is that I'm not allowed to use a loop or and if statement.
Answers (1)
Image Analyst
on 19 Oct 2018
0 votes
Since it's homework, we can't give you the answer outright. So read this link: http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers
Hint: use mean(), the greater than symbol, and sum().
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!