svd_sdata.m
来自「svd分析的例子」· M 代码 · 共 25 行
M
25 行
%生成数据矩阵子程序 sdata.m
points=14;
times=points*10-1;
stepa=1.5/200;
stepb=4/200;
a1=1.5:stepa:3-stepa;
b1=4:stepb:8-stepb;
t1=0:10:times;
f1=inline('a*sin(2*pi*t/140)','a','t');
%f2=inline('b*exp(-t/100)','b','t');
f2=inline('b*t.^2','b','t');
noise1=normrnd(0,0.5,200,points);
noise=normrnd(0,0.5,1600,points);
for i=1:200
ys(i,:)=f1(a1(i),t1);
ye(i,:)=f2(b1(i),t1);
end
ys=ys+noise1;
ye=ye+noise1;
data=[ys;ye;noise];
clear i f1 f2 t1 stepa stepb noise1 noise ys ye a1 b1
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?