Answered
Periodogram and Image Processing
xdft=fft2(x); xdft=xdft.*conj(xdft); xdft=xdft/(size(x,1)*size(x,2)); xdft=fftshift(xdft); surf(xdft);

14 years ago | 0

| accepted

Answered
Get frequencies out of data with an FFT
t = 0:.001:1-0.001; Fs = 1e3; x = 2+sin(2*pi*60*t); x = detrend(x,0); xdft = fft(x); freq = 0:Fs/length(x):Fs/2...

14 years ago | 3

| accepted

Answered
How to plot a semi-circle?
theta = 0:.01:pi; y = 500*exp(1j*theta); plot(real(y),imag(y)); axis([-750 750 -750 750]); gri...

14 years ago | 0

| accepted

Answered
Error using findpeaks => Too many input arguments.
Hi Alex, please use the command >>which findpeaks to ensure that you are using the MATHWORKS' version of findpeaks.m and n...

14 years ago | 8

Answered
help me plz
You cannot resize the image and then add it to versions which are not resized. Matrix addition is only defined for matrices o...

14 years ago | 0

| accepted

Answered
which wavelet transform for image compreesion yields better compression and better PSNR value?
Vishnu, I'm not sure what you mean by "which" wavelet transform. The critically-sampled wavelet transform or wavelet packet tran...

14 years ago | 0

Answered
error using plot()
Not sure why that is causing you a problem, (maybe a version problem), but try h_MeanCostPlot=plot(MeanCost,'k:','LineWidth...

14 years ago | 0

| accepted

Answered
how to calculate the time integral of a signal in numeric form
Use the integrator block from the Continuous library.

14 years ago | 0

Answered
Trouble with understanding frequency bins in MATLAB's documentation (FFT Phase plots)
Hi David, Due to the fact that the fft() is a numerical implementation of the DFT (and not the DFT), you may find that even in t...

14 years ago | 0

Answered
Trouble with understanding frequency bins in MATLAB's documentation (FFT Phase plots)
Hi David, the sampling frequency is 100 Hz, so the frequency axis should run from -50 to 50 Hz. The signal contains random no...

14 years ago | 0

Answered
linear fit
lsline is in the Statistics Toolbox, if you do not have that product you can use polyfit() to fit a 1st order polynomial. ...

14 years ago | 11

| accepted

Answered
function definition, where to save them?
You can save them in any folder. Then you have to add that folder to the MATLAB path. Use pathtool, or addpath For example, a...

14 years ago | 0

| accepted

Answered
linear fit
Hi, yes, you can use lsline() x = 1:10; y1 = x + randn(1,10); scatter(x,y1,25,'b','*') hold on; lsline;

14 years ago | 0

Answered
Audio Processing
Hi Kathik, You have left out an important bit of information and that is the sampling frequency. I'll assume that is 44.1 kHz in...

14 years ago | 0

| accepted

Answered
function that can do random drawing
You can just use rand. for nn = 1:1000 drawnum = rand(1); if( drawnum <= 0.2) category(nn) = 1; els...

14 years ago | 0

Answered
speech processing (denoising audio signal) with wavelet transform
Nadya, If you have the Wavelet Toolbox, then all the code you likely need is available there. See the reference material for ...

14 years ago | 1

Answered
acf
In addition to Walter's suggestion, you can use xcorr() in the Signal Processing Toolbox to obtain the autocorrelation sequence ...

14 years ago | 0

Answered
A doubt in ZERO PADDING IMPLEMENTATION
Raj, You don't want to insert zeros as you have done. That is called upsampling by two. Upsampling by two contracts the spectrum...

14 years ago | 1

Answered
How to Remove Elements in a Matrix Less than a Threshold?
You can just do this: (removing all entries larger in absolute value than 2) x = randn(10,10); indices = find(abs(x)>2);...

14 years ago | 6

| accepted

Answered
Determining periods using Continuous Wavelet Transform
Hi Richard, you can use the approximate relationship between scale and frequency to do this. Create a signal to illustrate th...

14 years ago | 0

| accepted

Answered
how to design a FIR filter.
You can use fdesign You do not give any information about your filter. Here is a lowpass filter with a cutoff frequency of 0....

14 years ago | 0

Answered
error using contour function
It looks like you are actually calling an undocumented function from the Signal Processing Toolbox, contours() u = randn(51...

14 years ago | 0

Answered
how to change the window length???
Yes in the sense that they will typically change the DFT bin in which they are located, but you have to remember that the freque...

14 years ago | 0

| accepted

Answered
how to change the window length???
You need to tell me what the sampling frequency is and how many samples you have. Assume that the sampling is 1 kHz, then if ...

14 years ago | 0

Answered
how to change the window length???
You don't tell us what the size of your t vector is. Applying a window is going to worsen frequency resolution because it broade...

14 years ago | 0

Answered
how to change the window length???
Hi Raj, The frequency resolution depends on the length of the signal and the sampling frequency. The DFT bins are spaced as Fs/N...

14 years ago | 0

Answered
Quick question about elementwise
Hi Tom, I don't think you need the dot multiplication on q, just x=exp(-(t/t0).^2).*cos(w0*(1-q*t).*t); On whether it's...

14 years ago | 0

| accepted

Answered
Troubles with Lillietest and chi2gof
I don't get that Sasi: rng default; % let's make sure we're using the same vector x = randn(100,1); [h,p] = chi2gof(x...

14 years ago | 0

| accepted

Answered
How to calculate nbins for chi2gof test?
Why don't you just use the default number of bins, which is 10. If you end up with fewer than 5 observations in the interior ...

14 years ago | 0

Answered
How to enter data for lilliefors test
Hi Daniel, Yes, lillietest() takes a vector input, so you will need to input the signals one at a time.

14 years ago | 0

| accepted

Load more