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个峰值对应的横轴都是非整数。现在迫切要解决的问题是创建新的波长数组并运用于卷积,进而得到合适的合成光谱图
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
为你推荐
- FIR滤波器设计的不调用fir函数的matlab,理想滤波的h序列引入了时延和窗函数时波形发生畸变
- 测试用例
- c语言
- 2个回答
- FPGA设计卷积核模块时,卷积核内部参数是如何确定的?
- 机器学习
- 神经网络
- 2个回答
- 卷积神经网络下面是如何将6变成16通道的
- 深度学习
- 2个回答
- 卷积神经网络,全连接层就是一个全连接神经网络吗
- 机器学习
- 神经网络
- 深度学习
- 人工智能
- 1个回答
- 有没有必要每层卷积后都接ReLU?
- 3个回答
- 关于opencv()中的腐蚀操作,我操作过后会让原来的圆变形,怎么让圆腐蚀后不变形依旧保持圆形?
- 人工智能
- 2个回答
- 基于卷积神经网络的人脸检测学习路线?
- 神经网络
- 深度学习
- 1个回答
- pytorch利用卷积神经网络实现验证码识别,但是在写测试集的准确率函数时遇到问题
- 机器学习
- 神经网络
- 深度学习
- python
- 人工智能
- 1个回答
- 文件名,目录名或卷标签语法不正确-尝试在Go lang中读取文件时
- string
- arrays
- 1个回答
- LSTM的格式 与卷积 。。。。。。。。。。。
- 神经网络
- 深度学习
- tensorflow
- 人工智能
- 2个回答
- 贝叶斯模型和卷积神经网络啥关系
- 机器学习
- 自然语言处理
- 神经网络
- 数据挖掘
- 人工智能
- 2个回答
- 卷积神经网络的一般结构
- 深度学习
- 1个回答
- 运行是为什么1不算进去,怎么修改,还有就是加入输入200 300 莫名会换好几行,怎么修改
- c++
- 1个回答
- python3 两个数组元素相乘求和,求优化
- 优化
- python
- 图像处理
- 2个回答
- tensorflow中卷积神经网络输出层除了能做分类,还有哪些其他的输出层?
- 拟合
- 神经网络
- tensorflow
- 3个回答
- 卷积和积分是一种什么样的关系存在?
- 图像处理
- 5个回答
- SQL语句帮忙优化!!!!!!!!!
- sql
- 优化
- 2个回答
- 有关图像卷积处理的疑惑,望解答
- 1个回答
- 采用交换法翻转矩阵的时候,为什么需要两重循环?
- 2个回答
- 求下列MATLAB代码如何获得最后两个PLOT的全部零点
- matlab
- 1个回答