Hello, Shaul Salomon.
. . .
Could you please double-check the consistency of your test 7 with the problem statement? The problem statement specifies that "[...] when the number 0 is generated. This number is not considered for the mean." . . .
In test 7, I get only one random number value, which is zero, and this should be discarded. Therefore the set of numbers to average is an empty set: this empty set has a sum of zero (or undefined?) and — most importantly — a count of zero. So therefore the mean there should be undefined, or NaN, as far as I can understand. This is how I implemented Solution 1391527. Please let me know if I am overlooking some important point. . . . —Thanks, David.
Getting the row and column location from a matrix
04 - Scalar Equations 2
Matlab Basics II - squares
Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
Capitilize the first letter of every word in a string
Remove the air bubbles from a vector
Separate even from odd numbers in a vector - without loops
Add a vector to a matrix
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office