其他分享
首页 > 其他分享> > matlab生成光谱仿真数据

matlab生成光谱仿真数据

作者:互联网

生成光谱仿真数据

% 模拟单狭缝到双狭缝到四狭缝
%
%
%     ...              ...  ...
%     ...  ..  ...     ...  ...
%   .......... ...  .. ...  ...
%     ...  ......   ......  ...
%     ...   .....    .....  ...
%     ...    ...       ............
%  .............       ...  ...
%      ...   ....     ....  ...
%   ......  .....    .....  ...
%   .......... ...  ......  ...
%   .......... ... ... ...  ...
%  ....... ..      ... ...  ...
%  .......             ............
%  ...  ...........    ...
%  ..
%
% 2019-07-27

clc
close all
clearvars

mfile_name = 'CAS_predict.m';
%path = 'I:\光谱预测\SR\h5\';
path = 'C:\Users\wym\Desktop\光谱matlab\新建文件夹\';
N = 40;
% [S31,~] = S_hadamard(N);
I_N = ones(N);
load s_std

vec_length = numel(s_std) + N;
strand_spectrum = s_std;

for idx = 1:numel(s_std)
    strand_spectrum = circshift(s_std,[1 idx]); %矩阵循环移位
    data_cube = zeros(N,vec_length);
    for num_k = 1:N
        data_cube(num_k,1:length(strand_spectrum)) = strand_spectrum;
        

标签:仿真,std,..,...,光谱,spectrum,.....,matlab,strand
来源: https://blog.csdn.net/qq_37473115/article/details/100561586