DSPRelated.com
Forums

Matlab FFT

Started by shoma April 14, 2006
shoma skrev:
> > > >shoma skrev: > >> >anyway, use the function CART2POL to transform your spectrum (NOT the > >> >power spectrum) to polar format, and plot the magnitude and phase. > >> >I'll guess there are peaks somewhere. Read the magnitude and phase > >> >for each peak. > >> > >> is not clear. can u tell me what you mean. > > > >First, in the exercise you have dealt with both the "norma" spectrum > >and the power spectrum. The difference is that only the "normal" > >spectrum contains phase information. Since you have been asked to > >find both magnitude and phase, using the power spectrum is out of the > >question. > > > >I assume you are familiar with complex numbers. Complex numbers > >can be formulated in two ways, either on carthesian form, as > > > >z = x + i*y > > > >where x is the real part, y is the imaginary part and i = sqrt(-1), or > >on > >polar form as > > > >z = r*exp(i*phi) > > > >where r is the magnitude and phi is the phase angle. > > > >CART2POL (use lowercase spelling in matlab) is a matlab function > >that converts from carthesian format to polar format. > > > >> and btw i am not an eng i took this course for fun but the matlab part > is > >> not fun at all :( > > > >Matlab is very efficient as a pedagogical tool, but it takes a > >bit of getting used to, > > > >Rune > > > > i understand that but how would i tell matlab to do that?
While this may sound grumpy, I am not going to tell you. Since you obviously need to know your way around matlab for this class, you need to learn how to use matlab. First, start matlab on your computer. If you type 'doc' without the apostrophes on the matlab prompt, you will get a matlab help page that will contain a link to "getting started with matlab". Read that section, and work through the exercises. Once you are familiar with the basic matlab operations, you can check out the individual functions, like cart2pol, by typing either help cart2pol or doc cart2pol at the matlab prompt. Then you will find explanations about what the function does and how to use it, along with some worked examples you can adapt to solve your own tasks. Rune
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message 
news:1145282812.843629.321410@z34g2000cwc.googlegroups.com...
> > shoma skrev: >> > >> >shoma skrev: >> >> >anyway, use the function CART2POL to transform your spectrum (NOT the >> >> >power spectrum) to polar format, and plot the magnitude and phase. >> >> >I'll guess there are peaks somewhere. Read the magnitude and phase >> >> >for each peak. >> >> >> >> is not clear. can u tell me what you mean. >> > >> >First, in the exercise you have dealt with both the "norma" spectrum >> >and the power spectrum. The difference is that only the "normal" >> >spectrum contains phase information. Since you have been asked to >> >find both magnitude and phase, using the power spectrum is out of the >> >question. >> > >> >I assume you are familiar with complex numbers. Complex numbers >> >can be formulated in two ways, either on carthesian form, as >> > >> >z = x + i*y >> > >> >where x is the real part, y is the imaginary part and i = sqrt(-1), or >> >on >> >polar form as >> > >> >z = r*exp(i*phi) >> > >> >where r is the magnitude and phi is the phase angle. >> > >> >CART2POL (use lowercase spelling in matlab) is a matlab function >> >that converts from carthesian format to polar format. >> > >> >> and btw i am not an eng i took this course for fun but the matlab part >> is >> >> not fun at all :( >> > >> >Matlab is very efficient as a pedagogical tool, but it takes a >> >bit of getting used to, >> > >> >Rune >> > >> >> i understand that but how would i tell matlab to do that? > > While this may sound grumpy, I am not going to tell you. > Since you obviously need to know your way around matlab > for this class, you need to learn how to use matlab. > > First, start matlab on your computer. If you type 'doc' without > the apostrophes on the matlab prompt, you will get a matlab > help page that will contain a link to "getting started with matlab". > Read that section, and work through the exercises. > > Once you are familiar with the basic matlab operations, > you can check out the individual functions, like cart2pol, > by typing either > > help cart2pol > > or > > doc cart2pol > > at the matlab prompt. Then you will find explanations about > what the function does and how to use it, along with some > worked examples you can adapt to solve your own tasks. >
type cart2pol is even more informative. Best of luck - Mike