i need help (matlab)

1 view (last 30 days)
khaled hassan
khaled hassan on 28 Oct 2020
Commented: madhan ravi on 28 Oct 2020
Write a matlab function called nbsup that returns, for an input vector A and a value x, the number of elements in A that are srictly superior to x.
  4 Comments
Murat Albayati
Murat Albayati on 28 Oct 2020
This is a vectorized way to count the number of elements in A vector that is greater than x. I suppose this is what you mean with "srictly superior to".
s = sum(A>x)
madhan ravi
madhan ravi on 28 Oct 2020
Murat in this forum it's strictly discouraged to provide a full homework solution unless the OP has shown his/her attempts.
disp('Show what you have tried so far')
Show what you have tried so far

Sign in to comment.

Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!