L·道·H G 2021-03-04 03:16
浏览 28

matlab创建新数组并用于卷积

 What I will do is provide you with an example:
 
%%%%%%% Start of MATLAB code %%%%%%%%%%%
%Make a Gaussian profile (this is your own code)
x = -1:0.01:1;
y = normpdf(x, 0, 0.035);
y = y./max(y); %normalise this profile.
 
%Make a test array, I advised you to do this already.
test=zeros(1000,1);
test(100)=1;
test(500)=1;
test(520)=1;
test(700)=1;
 
%perform the convolution
c_test=conv(test,y,'same');
 
%plot the results
stem(test);
hold
plot(c_test);  %You need to think carefully about the x axis here.
 
%%%%%%% End of MATLAB code %%%%%%%%%%%
 
 
Following this example should get you up and running. You need to give some thought to the wavelength axis. At the moment the wavelength values in your ‘landa’ array are fine for calculating the new intensity, but they are not suitable for plotting the convoluted spectrum as they are discontinuous. You need to make a new landa array, something like landa_new = 300:0.001:320; of course, you’ll have to use this new array for the convolution too, this will need some careful testing to make sure everything is ok.
 You should make the simulated spectrum for many different temperatures and compare them with the experimental data to find the closest match, this will tell you what temperature the experimental data is closest to.

这是我的Matlab的代码,目的是原图通过和高斯函数进行卷积做成一个合成光谱图,在306到310这个区间形成4个峰值,这4个峰值对应的横轴都是非整数。现在迫切要解决的问题是创建新的波长数组并运用于卷积,进而得到合适的合成光谱图

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
    • ¥15 MCNP里如何定义多个源?
    • ¥20 双层网络上信息-疾病传播
    • ¥50 paddlepaddle pinn
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏