微信:HuangL1121
QQ号:1224848052
团队:MATLAB代做|MATLAB专业代做|FPGA代做|FPGA专业代做
地址:北京市-朝阳区-双柳北街18号院
当前位置:首页 > 通信信号 > 薛定谔方程
项目案例
薛定谔方程
薛定谔方程
产品说明:clc;
clear;
close all;
figure
p     = 3*pi/2;
a     = 1;

alpha = -15:0.0005:15;
index = 1;

for i=1:length(alpha)
    if abs(alpha(i))<0.001
    y(i) = p + 1;
    else
    y(i) = p*sin(a*alpha(i))/(a*alpha(i)) + cos(a*alpha(i));    
    end     
end

plot(alpha,y,'b');hold on;
plot(-15:0.01:15,1,'r-','LineWidth',4);hold on;
plot(-15:0.01:15,-1,'r-','LineWidth',4);hold on;
title('y = p*sin(a*alpha)/(a*alpha) + cos(a*alpha)');
figure_s();
hold off;
%******注意通过以下代码求出图像中的填充区域*******
%四个区间:
%A:2.2540 - 3.1480
%B:4.7206 - 6.2965
%C:7.4290 - 9.4450
%D:10.3040- 13.2755 
% startpoint =  2.2540;
% endpoint   =  3.1480;
% N          =  10000;
% k          =  0;
% alpha2 = solvealpha(startpoint,endpoint,N,k);
% alpha2
%******注意通过以上代码求出图像中的填充区域*******

legend('p*sin(a*alpha)/(a*alpha) + cos(a*alpha)','k');
text(pi,  -1,'k=pi');
text(2*pi, 1,'k=2pi');
text(3*pi,-1,'k=3pi');
text(4*pi, 1,'k=4pi');
grid on;


figure
%使用四个区间的平方,作为图2的y轴区间
%使用四个区间的平方,作为图2的y轴区间
%使用四个区间的平方,作为图2的y轴区间
%AAAA
startpoint =  2.2540;
endpoint   =  3.1480;
N          =  10000;
k          =  -pi:(2*pi)/20:pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;
plot(-pi:(2*pi)/80:pi,alpha2(length(alpha2)));hold on;

clear k
clear alpha2

%BBBB
startpoint =  4.7206;
endpoint   =  6.2965;
N          =  10000;
k          =  -2*pi:(2*pi)/20:-1*pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;
k          =  pi:(2*pi)/20:2*pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;

plot(-1*pi:(2*pi)/80:1*pi,alpha2(1));hold on;
plot(-2*pi:(2*pi)/80:2*pi,alpha2(length(alpha2)));hold on;
clear k
clear alpha2


%CCCC
startpoint =  7.4290;
endpoint   =  9.4450;
N          =  10000;
k          =  -3*pi:(2*pi)/20:-2*pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;
k          =  2*pi:(2*pi)/20:3*pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;
plot(-2*pi:(2*pi)/80:2*pi,alpha2(1));hold on;
plot(-3*pi:(2*pi)/80:3*pi,alpha2(length(alpha2)));hold on;
clear k
clear alpha2
%DDDD
startpoint =  10.3040;
endpoint   =  13.2755;
N          =  10000;
k          =  -4*pi:(2*pi)/20:-3*pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;
k          =  3*pi:(2*pi)/20:4*pi;
for i = 1:length(k)
alpha2(i) = solvealpha(startpoint,endpoint,N,k(i));
alpha2(i) = alpha2(i)*alpha2(i);
end
plot(k,alpha2,'k','LineWidth',4);hold on;
plot(-3*pi:(2*pi)/80:3*pi,alpha2(1));hold on;
plot(-4*pi:(2*pi)/80:4*pi,alpha2(length(alpha2)));hold on;
clear k
clear alpha2

%画虚线
plot(pi,  0:4.7206^2,'r');hold on;
plot(2*pi,0:7.4290^2,'r');hold on;
plot(3*pi,0:10.3040^2,'r');hold on;
plot(4*pi,0:13.2755^2,'r');hold on;

text(-1, 145,'允带');
text(-1, 96,'禁带');
text(-1, 75,'允带');
text(-1, 45,'禁带');
text(-1, 30,'允带');
text(-1, 15,'禁带');


上一篇:MATLAB代做|IC_MMSE & LMMSE性能仿真分析

版权所有: MATLAB代做|MATLAB专业代做|FPGA代做|FPGA专业代做 Copyright © 2018 All rights reserved.
微信:HuangL1121 QQ:1224848052
地址:北京市-朝阳区-双柳北街18号院

扫一扫,关注我们