Right, this may be really simple but I am seriously struggling with it!(adsbygoogle = window.adsbygoogle || []).push({});

I have an array of data which shows a map of Sweden (the sea is masked out so all the values over the sea are set to 0). I need to calculate the root mean square of only the values not equal to 0 in my array, but I have no idea how to do this in Matlab. I can calculate the RMS of the whole array, but it comes out far too good (due to all the zeros over the sea!).

So if I have a 70x40 array how do I only pick out the values not equal to zero and take the RMS of them?

Help would be much appreciated.

A

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Calculating the RMS of an array

Loading...

Similar Threads - Calculating array | Date |
---|---|

[Maple] Calculating the potential produced by a charge | Feb 27, 2017 |

Storing calculations into a list | Feb 26, 2016 |

Adding restrictive conditions to a limit calculation | Jan 28, 2016 |

Matlab; Jacobian array calculation question | Jan 20, 2011 |

**Physics Forums - The Fusion of Science and Community**