Robbie Brady
2012-06-26 15:54:07 UTC
Hello,
I am currently trying to calculate spectral moment m-1 within matlab by integrating frequency^-1 with respect to power spectral density.
frequency = 64 x 1 x 727 matrix
PSD = 64 x 1 x 727 matrix
I have written the equation as following:
m1 = simpson (frequency3d.^-1.* PSD)
But what is returned is a matrix where each value is infinity, which makes little sense as when done on a calculator I get a numerical value.
If anyone has any idea where I am going wrong I'd be extremely grateful. I should also mention that I have tried other methods of integration (trapz, cumtrapz etc) with no success.
Many thanks,
Robbie
I am currently trying to calculate spectral moment m-1 within matlab by integrating frequency^-1 with respect to power spectral density.
frequency = 64 x 1 x 727 matrix
PSD = 64 x 1 x 727 matrix
I have written the equation as following:
m1 = simpson (frequency3d.^-1.* PSD)
But what is returned is a matrix where each value is infinity, which makes little sense as when done on a calculator I get a numerical value.
If anyone has any idea where I am going wrong I'd be extremely grateful. I should also mention that I have tried other methods of integration (trapz, cumtrapz etc) with no success.
Many thanks,
Robbie