Find the numeric mean of the prime numbers in a matrix. - MATLAB Cody - MATLAB Central

Problem 14. Find the numeric mean of the prime numbers in a matrix.

Difficulty:Rate

There will always be at least one prime in the matrix.

Example:

 Input  in = [ 8 3
               5 9 ]
 Output out is 4 or (3+5)/2

Solution Stats

48.09% Correct | 51.91% Incorrect
Last Solution submitted on Mar 02, 2025

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
2
4

Problem Recent Solvers8986

Suggested Problems

More from this Author96

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page