Prev: ActiveDCAM
Next: Matlab 2009a freezes
From: angelo on 28 May 2010 10:13 i have a plot of an eeg signal, of this i have only one channel. what can i do for choosing two points of this channel with mouse in figure and show me the fft?
From: Wayne King on 28 May 2010 10:49 "angelo " <ludangelo1987(a)yahoo.it> wrote in message <htoj22$qsr$1(a)fred.mathworks.com>... > i have a plot of an eeg signal, of this i have only one channel. what can i do for choosing two points of this channel with mouse in figure and show me the fft? Angelo, did you produce the plot of the eeg signal with plot()? In other words, do you have the data in MATLAB workspace? In that case, you can just Fourier transform a segment of the data. Wayne
From: angelo on 29 May 2010 05:54 "Wayne King" <wmkingty(a)gmail.com> wrote in message <htol5e$edg$1(a)fred.mathworks.com>... > "angelo " <ludangelo1987(a)yahoo.it> wrote in message <htoj22$qsr$1(a)fred.mathworks.com>... > > i have a plot of an eeg signal, of this i have only one channel. what can i do for choosing two points of this channel with mouse in figure and show me the fft? > > Angelo, did you produce the plot of the eeg signal with plot()? In other words, do you have the data in MATLAB workspace? In that case, you can just Fourier transform a segment of the data. > > Wayne yes i produce the plot with plot(). But can i take 2 points in the figure and show me the fft for every 2 points that i choose???if is possible how can i do????
From: Wayne King on 29 May 2010 07:28 "angelo " <ludangelo1987(a)yahoo.it> wrote in message <htqo7u$7nm$1(a)fred.mathworks.com>... > "Wayne King" <wmkingty(a)gmail.com> wrote in message <htol5e$edg$1(a)fred.mathworks.com>... > > "angelo " <ludangelo1987(a)yahoo.it> wrote in message <htoj22$qsr$1(a)fred.mathworks.com>... > > > i have a plot of an eeg signal, of this i have only one channel. what can i do for choosing two points of this channel with mouse in figure and show me the fft? > > > > Angelo, did you produce the plot of the eeg signal with plot()? In other words, do you have the data in MATLAB workspace? In that case, you can just Fourier transform a segment of the data. > > > > Wayne > yes i produce the plot with plot(). But can i take 2 points in the figure and show me the fft for every 2 points that i choose???if is possible how can i do???? Hi Angelo, I'm still not sure I completely understand what you want to take the Fourier transform of. I think you may either want to: 1.) choose a segment of your signal and take the Fourier transform of that segment, or 2.) you want to see the value of the Fourier transform at only two points. I'll assume here you want #1. You have a few options. If you want to choose your points graphically: % Let x stand in for your eeg signal x = randn(1024,1); plot(x); [X,Y] = ginput(2); % choose your two points xvalues = floor(X); eegDFT = fft(x(xvalues(1):xvalues(2))); Otherwise, you can just choose your points visually and, let's assume you want from point 100 to point 300: eegDFT = fft(x(100:300)); If you want to get a power spectral density estimate by choosing two points graphically in the signal to delimit your segment and you have the Signal Processing Toolbox, you can do: % again letting x be your eeg signal x = randn(1024,1); plot(x); [X,Y] = ginput(2); % choose your two points xvalues = floor(X); plot(psd(spectrum.periodogram('Hamming'),x(xvalues(1):xvalues(2)))); Hope that helps, Wayne
|
Pages: 1 Prev: ActiveDCAM Next: Matlab 2009a freezes |