matlab绘制包络线

clear all;
clc;
close all;
n=-5000:20:5000;
N=length(n);
nt=0:N-1;
x=120+96*exp(-(n/1500).^2).*cos(2*pi*n/600);
[up,down]=envelope(x,N,'analytic');
plot(nt,x,'k',nt,up,'r',nt,down,'g');
data12_20=csvread('F:\experiment\3-25\12-20.csv',22,0);
x12_20=data12_20(:,1);
y12_20=data12_20(:,2);
z12_20=data12_20(:,3);
data34_20=csvread('F:\experiment\3-25\34-20.csv',22,0);
x34_20=data12_20(:,1);
y34_20=data12_20(:,2);
z34_20=data12_20(:,3);
N12_20=length(x12_20);
[up,down] = envelope(z12_20,N,'analytic');
nt=0:N-1;
plot(nt,z12_20,'k',nt,up,'k',nt,down,'k');

matlab绘制包络线_第1张图片

https://blog.csdn.net/tapangjue3478/article/details/109115765?spm=1001.2101.3001.6650.6&utm_medium=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-6.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-6.pc_relevant_antiscanv2&utm_relevant_index=13
推荐博文

你可能感兴趣的:(matlab)