Prev: subpixel image translation
Next: simulink break point
From: nordmoon on 21 Feb 2010 18:46 Hi, I tried the code above but with slightly different gauss and lorentzian profiles as given by the theory. However when I do convolution between the two the line is shifted to other wavenumbers compared to the code above. Why does it do this and how can I stop it? I want it to appear where the other two lines (gaussian and lorentzian) are positioned. My code: resolution = 0.05; % minWavenumber = 2200; % maxWavenumber = 2300; % v0 = 2240; plotWavenumber = minWavenumber:resolution:maxWavenumber; plotWavenumber2 = (minWavenumber*2):resolution:(maxWavenumber*2); dvL = 0.55; sigmaG = 0.55; % The LineShapes lorentz = ( (1/pi)*dvL./... (dvL^2 + (plotWavenumber-v0).^2) ); gauss = ((1/(sigmaG*sqrt(pi)))*exp(-((plotWavenumber-v0.*ones(length(plotWavenumber),1)').^2)/(sigmaG^2))); voigt=conv(lorentz,gauss)/max(conv(lorentz,gauss)); %(normalized) Voigt profile plot(plotWavenumber,lorentz,plotWavenumber, gauss,'r') hold on plot(plotWavenumber2,voigt,'g')
|
Pages: 1 Prev: subpixel image translation Next: simulink break point |