f

#### a question about fft in matlab

```hello guys,

This may be a simple question for some of you but I am confused and

I have a semi circular 1D signal (assuming all values outside the
circular diameter are 0). I want to recover the width of the signal
from the Fourier transform of the signal by looking at the zero
crossing.

I create the signal as follows:

icenter = 100;
length = 200;

x = linspace(-icenter/2, icenter/2, length);

for i = 1:length
f(i) = 2*sqrt(r^2 - x(i)^2);
end

So, I get a semi-circular signal f( ).

Now, I do a FFT of f( )

F = fft(f);

My question is how can I use the first zero crossing of F and recover
the "value of the radius" of the original circular signal?

secondly, Is there any way by which I can calculate the zero crossing
of F (above) automatically in matlab?

The FFT has the form (2 * pi * JI (w * radius))/ (w * radius).

``` 0 3/4/2006 3:44:02 AM comp.dsp  20333 articles. 1 followers. 2 Replies 817 Views Similar Articles

[PageSpeed] 18

```On 3 Mar 2006 19:44:02 -0800, "nic@gmail.com" <singhnic@gmail.com>
wrote:

>hello guys,
>
>This may be a simple question for some of you but I am confused and
>
(snipped)

>The FFT has the form (2 * pi * JI (w * radius))/ (w * radius).
>

Hi,

what does the "JI" mean in your
above FFT expression?

You said you "want to recover the width of the signal
from the Fourier transform".  Wouldn't it be
easier to measure the width of your 1D signal
in its original domain rather than performing
an FFT?

[-Rick-]

``` 0  R
3/6/2006 1:26:14 PM
```nic@gmail.com wrote:
> hello guys,
>
> This may be a simple question for some of you but I am confused and
> will really appreciate your help.
>
> I have a semi circular 1D signal (assuming all values outside the
> circular diameter are 0). I want to recover the width of the signal
> from the Fourier transform of the signal by looking at the zero
> crossing.
>
> I create the signal as follows:
>
> icenter = 100;
> length = 200;
>
> x = linspace(-icenter/2, icenter/2, length);
>
> for i = 1:length
> f(i) = 2*sqrt(r^2 - x(i)^2);
> end
>
> So, I get a semi-circular signal f( ).
>
> Now, I do a FFT of f( )
>
> F = fft(f);
>
> My question is how can I use the first zero crossing of F and recover
> the "value of the radius" of the original circular signal?
>
> secondly, Is there any way by which I can calculate the zero crossing
> of F (above) automatically in matlab?
>
> The FFT has the form (2 * pi * JI (w * radius))/ (w * radius).
>

Is this some sort of Fourier-Bessel transform? If so, you ought to
be very careful about the terminology. FFT and DFT are terms that
apply specifically to the exponential basis functions. While the
Bessel functions act similarly on a disc geometry (like a circular
membrane), both the terminology and implementations are
different.

If this is indeed a Fourier-Bessel transform, you might want to
(cross)post the question on some usenet group for mathematical
physics. The FBT would probably be too arcane for comp.dsp.

Rune

``` 0 3/7/2006 9:51:39 AM Similar Artilces:

Hi all, I'm new to matlab FFT algorithm, I'm doing some tests with a simple sine function. I've got two questions: one about amplitude and the other about phase. The code is this: wave = sin(linspace(0,2*pi,100)); fs = 10000; % Sampling frequency n = length(wave); Y = fft(wave); A = 2*abs(Y)/n; % Amplitude spectrum phase = angle(Y)*180/pi; 1) Why am I getting amplitude A(2) = 1 only if I multiply abs(Y) by 2? 2) Why am I getting phase(2) = -90 and not zero? Thank you very much! Matteo. Ettos <matmailRIMUOVIQUESTO@europe.com> wrote in message <4ae09934\$0\$831\$4fafbaef...

Question about DSP in Matlab (beginner)
Hi, I'm starting to learn DSP (Matlab )and I have two questions about it, maybe someone can help me out? I'm trying to measure a frequency from an Audio Device and I'm using FFT to transform it from the time domain to the frequency domain. But I am doing a downsample before the FFT. But you can also do it after the FFT. Do you know what would be the most efficient (before or after)? And why? Another question, I am using zero padding to increase my system resolution (up to 50Hz). My frame length is N=256 and sample frequency fs= 44100 Hz. So 44100/50 = 882, so I need to add 626 zeroes (to 256 frame length) to get 50 Hz resolution, I hope this is correct? I believe this is done for FFT. But is this the same for the DFT? Thank you and regards, --------------------------------------- Posted through http://www.DSPRelated.com >Hi, > >I'm starting to learn DSP (Matlab )and I have two questions about it, >maybe someone can help me out? > >I'm trying to measure a frequency from an Audio Device and I'm using FFT >to transform it from the time domain to the frequency domain. But I am >doing a downsample before the FFT. But you can also do it after the FFT. >Do you know what would be the most efficient (before or after)? And >why? > >Another question, I am using zero padding to increase my system >resolution >(up to 50Hz). My frame length is N%6 and sample frequency fs= 44100 >...

Questions about the fft function in Matlab
Hi all I have made a Fourier transform, based on the example in the help-function in Matlab, but I have a few questions about the calculation in the fft-function. From the example in Matlab Help I got this: L = numbers of samples in the sampled signal Fs = sampling frequency (1) NFFT = 2^nextpow2(L); (2) Y = fft(y,NFFT)/L; (3) f = Fs/2*linspace(0,1,NFFT/2+1); (4) plot(f,2*abs(Y(1:NFFT/2+1))) (5) title('Single-Sided Amplitude Spectrum of y(t)') (6) xlabel('Frequency (Hz)') (7) ylabel('|Y(f)|') Why is the fft divided by L? (2) When plotting, why is the ab...

Complex FFT in DSP vs Matlab
Hi, everyone! I use TMS320c6713 DSP. I compared result of complex fft library in TI DSP with result of complex fft in Matlab. Those waveform in frequency domain are similar, but exactly not matched. It means.. Range of result in DSP library is wider than one in Matlab. Why? Regards. jaeper@gmail.com wrote: > Hi, everyone! > > I use TMS320c6713 DSP. > I compared result of complex fft library in TI DSP with result of > complex fft in Matlab. > Those waveform in frequency domain are similar, but exactly not > matched. > > It means.. > Range of result in DSP library is wider than one in Matlab. > > Why? > > > > Regards. > Because the MathWorks and TI used different algorithms. A more specific answer depends on the details of the implementations in both MatLab and the TI library -- and you can bet that you'll never get the MathWorks to cough up their code. If it really matters -- code it yourself. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html On Feb 14, 9:08 pm, Tim Wescott <t...@seemywebsite.com> wrote: > Because the MathWorks and TI used different algorithms. A more specific > answer depends on the details of the implementations in both MatLab and > the TI library -- ...

FFT Matlab
I have been collecting emg signal and would like to look at the frequency of the signal. In Matlab I know there is an FFT function which I have been using, but ran into a problem when using it. The example given in the help says it is using a 512-point FFT. I tried using a 512-point FFT and a 2056-point FFT and noticed that they look very different. Is the only difference that the 512 gives less points to plot than the 2056? I noticed when I plotted signal of a specific length (1:1000) then plotted more of the same signal (1:2000), the frequency spectrum overlapped completely if I used the 512, but if I used the 2056 there was change (plots did not completely overlap) in frequency distribution. The latter is what I would expect to see, but was wondering why this would occur? Thank you very much. >I have been collecting emg signal and would like to look at the >frequency of the signal. In Matlab I know there is an FFT function >which I have been using, but ran into a problem when using it. The >example given in the help says it is using a 512-point FFT. I tried >using a 512-point FFT and a 2056-point FFT and noticed that they look >very different. Is the only difference that the 512 gives less points >to plot than the 2056? > >I noticed when I plotted signal of a specific length (1:1000) then >plotted more of the same signal (1:2000), the frequency spectrum >overlapped completely if I used the 512, but if I used the 2056 there >...

How does matlab work in this issue ? a matlab principle question
Hello everyone I have an ODE solver computing the temperature every month during a year this script will do the job for j=1:12 [t,T]= ode45(@monthly_solver,tspan,Tic,[],monthly_heat(j),h2(j),); end where Tic is the intial temperature and J loops represents the months Now the question is about matlab principle and how does it work with the initial condition? i mean as the last temperature of the 1st month is the begining temperture of the 2nd month and the last temp. of the 2nd month is the begining temp. of the 3rd month and so on. Do i need to write a command to do ...

Hi, I have been called for an interview for phd in signal processing from an institute which does research in physics and astronomy. I dont know what to expect. ( I guess they will thorougly grill me). I have done masters majoring in DSP and some years of industry experience. I had done my masters thesis in linear predictive coding of speech and wavelets. The work in the industry was mainly implementation side , video and image compression (H.264,JPEG2000) algorithms on DSPs. Its been quite a while from the last time i had read a text book. I request you to contribute some questions in this thread which could serve as a reference for people in this kind of a situation in general. Also request you to contribute some questions on what to expect in a phd interview other than technical stuff. On May 13, 9:54=A0pm, rajesh <getrajes...@gmail.com> wrote: > Hi, > > =A0 =A0 =A0I have been called for an interview for phd in signal processi= ng > from an institute which does research in physics and astronomy. I dont > know what to expect. ( I guess they will thorougly grill me). > > I have done masters majoring in DSP and some years of industry > experience. I had done my masters thesis in linear predictive coding > of speech and wavelets. > The work in the industry was mainly implementation side , video and > image compression (H.264,JPEG2000) algorithms on DSPs. > > Its been quite a while from the last time i had read a text book...

How to apply fft in matlab and see the waveform of fft of a given signal
I need help in matlab code for applying fft and perform fft waveform of a given signal....who can help me?? Chai wrote: > > > I need help in matlab code for applying fft and perform fft > waveform > of a given signal....who can help me?? perhaps My_Spectrum = fft(My_Signal); My_Spectrum_Conventional = fftshift(My_Spectrum); plot(real(My_Spectrum_Conventional),'r');hold on; plot(imag(My_Spectrum_Conventional),'r');hold off; maybe Dave Robinson Thanks for your kindness. I still working on my project.more question will be coming if you don mind helping me. s...

Hi, was wondering if anyone could help. there are a few things i need to know about some Matlab functions 1- if Pwelch and fft are used to find the Spectral Power Density. but how come when u apply them to the same data, the graphs look different? 2- when using the sendmail function, how does Matlab make the connection and send the data? ive looked at the code that Matlab uses for "sendmail" but its very difficult to understand. if anyone could help, i would be really greatful . thanks. ...

Again an FFT question
Dear FFTers, I was just wondering about the translation of the FFT so that the what is l= ocated at (0,0) goes in the middle of the image (N/2,M/2). Until now I did this doing simply a shift of the FFT image, that is: FFT_Img =3D SHIFT(FFT(Img),N/2,M/2) Now I have seen that some people use a FFT "trick" to shift the image. They= switch every second pixel of an image to its negative value. This is justi= fied by the translation properties of the DFTs and results in a translation= of half the image size (for those seeking to understand the math, try to m= ultiply the function (image) by exp(i*2*Pi(u0*x/N)) and after integration y= ou will get a translation of the Fourier image (signal for 1D) of F(u-u0). I have tested the difference between the two shifting methods with the foll= owing code (in double precision just to be sure I wouldn't get rounding err= ors or so): ;************************** n =3D 256 img =3D RANDOMU(S, n, n) ; Eventually put your image here, with the *right*= size xx =3D LINDGEN(n) # (LONARR(n)+ 1) yy =3D (LONARR(n)+ 1) # LINDGEN(n) xxyy =3D xx+yy OddCenteredImg =3D Img EvenCenteredImg =3D Img Odd =3D WHERE((xxyy MOD 2), COMPLEMENT=3DEven) OddCenteredImg[Odd] =3D -Img[Odd] EvenCenteredImg[Even] =3D -Img[Even] WINDOW, XSIZE=3D2*n,YSIZE=3D3*n TVSCL, Img, 0 ;Transform by standard shifting TVSCL, OddCenteredImg, 1 ;Transform by standard shifting TVSCL, ALOG(ABS(SHIFT(FFT(Img,/DOUBLE),n/2,n/2))), 2 ;Transform...

some DSP question

fft question
I have a 24387 x 1 array of sap flow data for my study site, measured at 2 minute intervals. While I know that the data cycles daily (1/86400sec = 1.15740e-005 Hz), I not only want to show this via a fast fourier transform, but also want to understand other cycles. I am new to signal processing, and therefore need help in understanding the next steps to take. This is what I've done to date: Y=dataarray(1:2^14); N=2^14; x=abs(fft(Y,N)); plot(fftshift(abs(fft(Y)))); The above plot shows my peak at about 8200. How do I evaluate my data with a fft with a meaningful frequency axis? Can someone please point me in the right direction? Thanks very much, Cory Cory Pettijohn wrote: > > > I have a 24387 x 1 array of sap flow data for my study site, > measured > at 2 minute intervals. While I know that the data cycles daily > (1/86400sec = 1.15740e-005 Hz), I not only want to show this via a > fast fourier transform, but also want to understand other cycles. > I > am new to signal processing, and therefore need help in > understanding > the next steps to take. This is what I've done to date: > > Y=dataarray(1:2^14); > N=2^14; > x=abs(fft(Y,N)); > plot(fftshift(abs(fft(Y)))); > > The above plot shows my peak at about 8200. How do I evaluate my > data with a fft with a meaningful frequency axis? Can someone > please > point me in the right direction? Thanks very much, > Cory You need to generate exact frequency a...

Questions, Questions...
Hi! I took the routine from Gastronor.mdb: In the frmOrderDetails -> ITemID_AfterUpdate: Dim strFilter as String strFilter = "ItemID = " & Me!ItemID but it didn't work on win 2000 with access 2000. However, after playing around for a while, I found: Me!UnitPrice = ItemID.Column(2) to work just fine, even after updating prices in the tblItems. Anybody knows why? The routine in win 98/win nt in the footer of frmOrderDetails: =Sum((Price*Amount*(1-[Discount])/100)*100)) didn't either work. After testing and trying I finally discovered that =Sum(Price*Amount*Discount) does the job on win 2000. ???? What is happening? Anybody know if there is a major difference in this thing from win98/win nt to win 2000? (I should maybe say that I'm working only with DAO 3.6) Questions: 1.I have my own four buttons on frmOrders (btnGoToFirst,btnGoToPRevious,btnGoToNext,btnGoToLast). How can I disable them: when user click GoToLast and comes to last order and I wish that btnGoToNext and btnGoToLast should be disabled, and similarly with the first record? Anybody know an article on this? 2.I have two invisible fields on the form. I=chkWritten and II=chkCreditMemo In the cmdWriteCreditMemo I want to check whether I and/or II is checked. Because the user should not be able to print a CreditMemo if either he forgot to print an invoice first, or if he already sendt both invoice and creditmemo to printer. I have been trying: if (Me.chkPrinted.Value=False) AND ...

I have 2 signals with sampling freq 50Hz and different duration. a[n] = [a1 a2 a3 .... an] b[n] = [b1 b2 b3 ............................... bn] In matlab, how to find: A[z]xB[z] A[z]/B[z] Z'(A[z]/B[z]) where Z'() is the inverse Z transform. Thank you! Edw ...

DSP question
Hi I am searching a DSP to test a DMT algorithm implementation The goal is to transmit a signal between two boards based on DSP + PPC 8260 Thanks Cheers ...

Matlab AM question
Dear all, I am trying to implement a very simple version of an AM receiver in Matlab but as I am new to this software package I seem to be getting nowhere. So far I have searched the web and Matlab books for examples that would help me to understand how this could be done without much success. I now this is probably a silly thing to ask but could anyone guide me in the right direction, i.e. links to websites, etc. or maybe provide me with a hints. Anything would help really. Your help is much appreciated. Thanks Justin. -- ---------------------------------------------------------------------------- -------- "There's no point in being grown up if you can't be childish sometimes" Fourth Doctor Who(Tom Baker) Doctor Who Web Site www.doctorwho.hopto.org "Justin Champion" <j.c.champion@staffs.ac.uk> wrote in news:30efnvF2vttghU1@uni-berlin.de: > > Dear all, > I am trying to implement a very simple version of an AM > receiver in > Matlab but as I am new to this software package I seem to be getting > nowhere. So far I have searched the web and Matlab books for examples > that would help me to understand how this could be done without much > success. I now this is probably a silly thing to ask but could anyone > guide me in the right direction, i.e. links to websites, etc. or maybe > provide me with a hints. Anything would help really. > > Your help is much appreciated. &g...

FFT Questions.....
I have had some experience with the DFT, and realize that the fft produces the same results, only faster. I understand the whole concept of resolution, that if 128 samples are taken at 10kHz, there are only 128 possible frequencies (all equally spaced from 0 to 10k) that can be absolutely determined. Is there an algorithm that performs a second fft of the same original signal, but over only the frequency bands that the current transforms resolution can't determine? Can you perform an fft over a range of freqencies not including 0Hz? "Todd" <muirt@purdue.edu> wrote in me...

questions on FFT
Hi all, I feel confused with some trivial questions and your help is highl appreciated. 1. Suppose Y(k) is the N point FFT of the original data, for me, the powe spectrum is Y.*conj(Y). However, the example in "Matlab help" of fft tell that the power spectrum is Y.*conj(Y)/N. 2. I need to calculate the power of a specific band, for example 10-20Hz What I do is just to take FFT and sum up the power of frequency component within 10-20Hz. I am wondering if it is a right way and if there is an other better way. 3. Suppose I have N samples in time domain and the time interval is t. want to remove its low frequency components. So I desigh a K order FI highpass filter. The length of the resulting signal is N+K-1. Does th time interval is still meaningful in the resulting signal? What if I stil want to keep N samples of the resulting data? Thanks, Jeff jeffxia wrote: .... > 3. Suppose I have N samples in time domain and the time interval is t. I > want to remove its low frequency components. So I desigh a K order FIR > highpass filter. The length of the resulting signal is N+K-1. Does the > time interval is still meaningful in the resulting signal? What if I still > want to keep N samples of the resulting data? Let's say you have two polynomials, one with degree N and the other with degree K. You multiply them together, the new polynomial has degree N+K. Can you throw away some terms to make it have degree N? Obviously, if N is the number ...

Matlab how to question?
I am a student of engineer, and I am in a course that's call numeric calculus. I have to do a shore an I'm stuck in a question. I have to minimize the error of an aproximation and make a matlab program that do that, just receiving a few points in two dimensions. More clearly, I will receive a table with 20 points, like (x1,y1)(x2,y2)...(x20,y20), and with the method "ortogonal square minimus" (Something like that) I have to minimize the error of an aproximate polynomial. Some clues? I would apreciate a lot any help anyone may do. Thanks. jim In article <4025405.1180395885...

Few matlab questions
Hello, I have this questions for you. I hope some one can help me. So I have a background image and I want to insert another image over it. A ball for example. But this ball get on top of the background and it streches to full screan. 1) How to make matlab plot a picture in its original size. I don`l want to be stretched. 2) My ball picture is a PNG file so i need not to show the transparent pixels. I used: A = imread('ball.png','BackgroundColor','none'); image(A) but it isn`t working.. 3) Can I load an animation or sound in the plot ...

FFT question
Dear, &nbsp; I have never used FFT function to identify some frequency of the data. The attached data should be shown in 1 Hz or 0.5 Hz. (not identified easily after transforming in my eyes.) If you open my vi, you can find the original data and transformed result. Would you please check my simple code? Am I right? &nbsp; *) I got to know there are so many FFT functions in example code and I found only one vi can be applied to my code. What's the difference among them? ultrasonic.vi: http://forums.ni.com/attachments/ni/170/230966/1/ultrasonic.vi exam.txt: http://forums.ni.com/attachments/ni/170/230966/2/exam.txt ...

A DSP question...
Are the largest fonts available referred to as ele-fonts? "Edwin" <thorne25@juno.com> wrote in post 1103565072.692494.4060@c13g2000cwb.googlegroups.com on 12/20/04 10:51 AM: > Are the largest fonts available referred to as ele-fonts? > Cute... I may use that in a class someday. Thanks. :) -- If A = B and B = C, then A = C, except where void or prohibited by law. Roy Santoro, Psycho Proverb Zone (http://snipurl.com/BurdenOfProof) Snit wrote: > "Edwin" <thorne25@juno.com> wrote in post > 1103565072.692494.4060@c13g2000cwb.googlegroups.com on 12/20/04 10:51 AM: > > > Are the largest fonts available referred to as ele-fonts? > > > Cute... I may use that in a class someday. Thanks. :) You're welcome. :-) ...

i made a *.m file with de next code q=1.6e-19; Vd=-80; Eo=8.85e-14; E=11.9*Eo; Na=logspace(10,19,20); E_rup_1=20+5*log(Na/1e14)+Na/1e17; E_rup_2=sqrt((-2*q*Na*Vd)/E)*1e-4; semilogx(Na,E_rup_1,Na,E_rup_2) I have ploted in logaritimic scale the functions, "E_rup_1" and "E_rup_2" depending off Na, on the plot and for a Na value, the 2 functions are equal. How can i get the Na value? Thanks If you're trying to graphically determine at which value(s) of Na the two curves are equal, try ginput. HELP GINPUT Kyle beporo wrote: > > > i made a *.m file with de n...

Some questions on matlab
Hi all, i am using matlab and encountered some problems. Kindly advice. 1)i am using newff function to create a neural network.After which, someone advised me to set some of the parameters ,for example, net.performFcn,net.trainParam.goal and many more. But i tried using my matlab help and search for function to llok up for what these parameters do. However, i can't find any help on these parameters. Where can i find them? 2)i intend to use the train function to train my network. In the train function, according to the help file,we can also give T(network targets) as input. Can someone ki... Web resources about - a question about fft in matlab - comp.dsp Apple responds to FBI iPhone hack, but questions remain
Yesterday, the FBI announced that it had managed to break into the San Bernardino shooter's iPhone sans help from Apple. The iPhone manufacturer ...

4 Questions That Unlock Brand Potential
It’s difficult to escape the pervasive influence that brands have on our lives. In the broadest sense, brands constitute the organizing mechanism ... US Hacks iPhone, Ends Legal Battle But Questions Linger
The extraordinary legal fight pitting the Obama administration against technology giant Apple Inc. ended unexpectedly after the FBI said it used ...

Foster dad's alleged serial sex abuse raises significant questions
Foster dad's alleged serial sex abuse raises significant questions U.S. hacks iPhone, ends legal battle but questions linger
The extraordinary legal fight pitting the Obama administration against technology giant Apple Inc. ended unexpectedly after the FBI said it used ... FBI's iPhone hack raises troubling questions
The US Department of Justice says it was able to break into an iPhone without Apple's help, but it won't answer queries about the data it accessed. ... EgyptAir hijacking raises security questions
CNN EgyptAir hijacking raises security questions CNN (CNN) You're the pilot of a passenger airliner. A flight attendant brings news: There's ... FBI hack raises questions about iPhone security
The FBI hack of an iPhone 5c running iOS 9 may have left the device just a little bit insecure in the eyes of some users, as the agency has not ...

Resources last updated: 3/30/2016 2:20:30 AM