wayne jackson - MATLAB Cody - MATLAB Central

wayne jackson

9920
Rank
3
Badges
570
Score
51 – 71 of 71

wayne jackson submitted a Comment to Problem 14. Find the numeric mean of the prime numbers in a matrix.

I don't understand why this doesn't work for test 3: out=sum(in.*isprime(in))/sum(isprime(in)) it works for all other tests but test 3 requires an answer of 3 and the code gives an answer of 3.0000. Can anyone tell me why?

on 6 May 2014

wayne jackson received Solver badge for Solution 438204

on 5 May 2014

51 – 71 of 71
Go to top of page