Spectral density and average frequency

Click For Summary
SUMMARY

The discussion focuses on solving Equation 10.25 for mean angular frequency using MATLAB. The user has provided spectral density values and corresponding angular frequencies, attempting to compute the mean angular frequency (x') using the formula x' = integral(x*y(x).dx) / integral(y(x).dx). The user correctly identifies the numerator as the weighted sum of x and y, but encounters issues with the calculation of x' using the MATLAB function trapz for integration, leading to incorrect results. The community is tasked with identifying the error in the user's approach.

PREREQUISITES
  • Understanding of spectral density and angular frequency concepts
  • Proficiency in MATLAB programming and syntax
  • Familiarity with numerical integration techniques, specifically the trapezoidal rule
  • Knowledge of mean angular frequency calculations
NEXT STEPS
  • Review MATLAB's documentation on the trapz function for numerical integration
  • Explore alternative numerical integration methods in MATLAB, such as quad or integral
  • Study the mathematical derivation of mean angular frequency from spectral density
  • Investigate common pitfalls in weighted averages and numerical calculations in MATLAB
USEFUL FOR

Graduate students in engineering or physics, MATLAB users working with spectral analysis, and researchers needing to compute mean angular frequencies from spectral density data.

doop4
Messages
4
Reaction score
0
Essentailly what I am interested is to solve Equation 10.25 in the following link

<http://books.google.co.uk/books?id=Hwb5D60vb5IC&pg=PA701&lpg=PA701&dq=%22mean+angular+frequency%22&source=bl&ots=dSH6fzeZNC&sig=GB5J8nwpLCIULGhAHZLAm0RxgLM&hl=en&ei=NubNSpKqO92NjAeqwKmHBA&sa=X&oi=book_result&ct=result&resnum=9#v=onepage&q=%22mean%20angular%20frequency%22&f=false>

ie. solve for the mean angular frequency. Let's call it x' where

x'=integral(x*y(x).dx)/integral(y(x).dx) % Equation 10.25 where y(x) is the spectral density and x is the angular frequency.

I have data for the spectral density values for a given angular frequency


y=[6.2770
10.5137
14.8385
19.2196
21.5972
19.6632
15.2690
10.9238
6.5569]

x=[ 2.6097
2.6158
2.6259
2.6314
2.6501
2.6615
2.6633
2.6654
2.6659]

How can I solve for x' using the above data in Matlab?

My understanding is that the numerator is essentially:

sum[x*y(x)] for the given values of x and y (ie a weighted form ). therefore I have

numerator=x.*y;

the bottom is the integral so i tried using the MATLAB function trapz(x,y) to calculate that as well.

denominator =trapz(x,y);

therefore x'=numerator/denominator

But the answer I get is incorrect. I am not sure where my mistake is. Any help will be much appreciated!
 
Engineering news on Phys.org
Is this schoolwork or work-work? It needs to be posted in different places, depending.

Quiz Question -- Why?
 
It's sort of "home work" of a grad. Any ideas on a solution?
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K