I use the defination of PSD to calculate the PSD expression of cos, however, the result is different with the result computed by matlab function! Please give the difference expaination,thank you very much. The figure and code are attacted !
This the result, and the code is below,
clear
L=200;
deltax=0.01;
fs=1/deltax;
x = 0:deltax:L;
y = cos(x);
nfft=2*round(numel(x)/4);
%---pwelch
[px2,fx2]=pwelch(y,hanning(nfft),nfft/2,nfft,fs);
umin=0;
umax=1e3;
u=umin:deltax:umax;
psd_temp=(2*sin(L/2)*cos(pi*L*u)-4*pi*u*cos(L/2).*sin(pi*L*u))./(1-4*pi^2*u.^2);
psd_temp=psd_temp.^2/L;
figure
loglog(u,psd_temp)
hold on
loglog(fx2,px2,'r')
legend({'Analytical by defination','Numerical result by matlab function'})
set(gca,'fontsize',12)
figsize_only(12,10)
However, in the analytical solution, the denominator will be zero when u equals 1/2/pi, Can any body give explaination from math view?
Aparna Sathya Murthy
Dear Aparna Sathya Murthy ,
I also tried the psd function in matlab which uses the fft to calculate the PSD, the result is the same with pwelch()
When I decreace the interval of u in the analytical expression of PSD for finite length,I got strange figure!
Code belw:
L=1000;
deltax=0.0001;
fs=1/deltax;%---------sample frequency
nfft=2*round(numel(x)/4);%-------fft num
%---psd
[px,fx]=psd(y,nfft,fs,hanning(nfft),nfft/2);
px=px/fs*2;
px([1,end])=px([1,end])/2;
%---plot
loglog(fx,px);
legend('psd','pwelch')
title('psd与pwelch method by matlab')
plot(fx,px);
plot(fx2,px2)
For finite length PSD analytical solution, can I use the Window function to make the head and taile of the sample length zeros?
Hi, I know that low molecular weight (MW) molecules generally tend to have higher mobility, while high molecular weight molecules tend to have lower mobility. However, in my experimental...
06 August 2024 1,495 2 View
Hi all, may I ask you for advice about treating monolayer culture cell line with essential oil. Due to the hydrophobic character of the oil, I am concerning how can it equally affect to all the...
31 July 2024 5,301 2 View
I'm very interested in biotechnology and medical research and I'd like to meet a professional here and talk about it together
28 July 2024 3,798 4 View
Where do I download the codes, databases commonly used by researchers?
16 July 2024 295 0 View
Hello, I was attempting to download some sequences data from NCBI. The format "gene features" could help me extract certain gene fractions using the names, but I found that it seems to be...
04 July 2024 9,875 1 View
"Nuclear-mitochondrial DNA segments (NUMTs) are mitochondrial DNA (mtDNA) fragments that have been inserted into the nuclear genome." (Xue et al., 2023) I would like to know under this...
20 June 2024 603 1 View
Can Opti-MEM without serum be used for transfection? Myotubes are typically at a high density upon successful differentiation. Does this reduce the efficiency of transfection?
15 May 2024 5,843 0 View
If the depolarization ratio of a Raman peak is less than 0.75, it is a polarized band, and if it is greater than 0.75, it is a depolarized band.
04 May 2024 2,829 0 View
After treating my membrane with the primary antibody, the destaining buffer was accidentally used instead of tbst buffer. Immediately after use (about 3 seconds later) it was replaced with tbst...
24 April 2024 2,625 1 View
For Mechanosensitive ion channel, I would like to compare their membrane tension. Most of their values can be found, but this one is not available.
15 April 2024 3,430 0 View
I am new to Micromechanics and having similar problem with understanding the implementation of the formula's. I would appreciate if anyone can guide me on how to go about getting a scalar value...
30 July 2024 969 0 View
Please, what is the memory consumption of the Matlab function quad tree decomposition procedure [S = qtdecomp(I)] with respect to the input set I?
27 July 2024 5,455 2 View
Hello, I am a research scholar currently working on a project involving image segmentation, and I am interested in using differential evolution for this purpose . I would greatly appreciate it if...
25 July 2024 9,926 1 View
Hello!!! I want to implement the Swerling characteristics functions (CF) directly in MATLAB without using its Fourier integral pairs...the Swerling CFs are actually Laplace Transform of the signal...
23 July 2024 4,925 1 View
Currently I need to calculate detection probabilities (PD) from radar cross section (RCS) data. Beta distribution parameters for this RCS data are calculated and will be used in Swerling0...
22 July 2024 868 0 View
Actually, I'm having trouble implementing the plot of the flutter region for the whirl prop system with 2 DOF (Influences of structural damping and propeller—pivot point distance on whirl flutter...
21 July 2024 5,047 2 View
Time-Frequency Domain
19 July 2024 8,031 2 View
Crack detection using Jestson nano board with real time camera
10 July 2024 6,283 0 View
I have a 3D output in the figure section of Matlab, does anyone know a way to transfer it to Abaqus or Ansys? Or in what format should I save it so that these analysis software can analyze it?
09 July 2024 9,226 3 View
I am working on some .edf files. I try to extract the frequency distributions from the EEG waves. The thing is, which i can't be sure if it is a problem or not, the most dominant frequency...
28 June 2024 6,897 4 View