Question

In: Computer Science

Hi, I need a Matlab code satisfies the following question. Output should be a graph similar...

Hi, I need a Matlab code satisfies the following question. Output should be a graph similar to a sine or cosine graph or similar to electrocardiograms (EKG/ECG) graph. Please I'd appreciate it. All love. Thanks :)

In elementary quantum mechanics, the square well is used to model the behavior of a bound particle, in which one or more forces (external potentials, interaction with other particles, etc) prevent or restrict its ability to move about. We have seen in class that the solutions to the Schrodinger equation in and around the quantum well result in a series of eigenvector wavefunctions with distinct energy levels. In this assignment, we will use MATLAB to create the system and experiment with different dimensions and barriers.

In MATLAB, model the finite square well scenario by building the Hamiltonian matrix and using the "eig" function to solve for the eigenvectors and eigenvalues. Experiment with potential barrier values of 500eV and 1000eV, and plot the resulting waveforms superimposed over the square well. What were the confined-state energy levels? What physical significance do the eigenvalues and eigenvectors have? Do some research on the Kronig-Penney model, in which a repeating series of finite square wells is used to model the behavior of particles within a crystalline material, and discuss the significance. What is different about the behavior of electrons in a single atom versus that in a solid material?

Solutions

Expert Solution

complete.m

x=0.01:0.01:2;

default=input('Press 1 if u want default ecg signal else press 2:\n');

if(default==1)

li=30/72;

a_pwav=0.25;

d_pwav=0.09;

t_pwav=0.16;

a_qwav=0.025;

d_qwav=0.066;

t_qwav=0.166;

a_qrswav=1.6;

d_qrswav=0.11;

a_swav=0.25;

d_swav=0.066;

t_swav=0.09;

a_twav=0.35;

d_twav=0.142;

t_twav=0.2;

a_uwav=0.035;

d_uwav=0.0476;

t_uwav=0.433;

else

rate=input('\n\nenter the heart beat rate :');

li=30/rate;

%p wave specifications

fprintf('\n\np wave specifications\n');

d=input('Enter 1 for default specification else press 2: \n');

if(d==1)

a_pwav=0.25;

d_pwav=0.09;

t_pwav=0.16;

else

a_pwav=input('amplitude = ');

d_pwav=input('duration = ');

t_pwav=input('p-r interval = ');

d=0;

end

%q wave specifications

fprintf('\n\nq wave specifications\n');

d=input('Enter 1 for default specification else press 2: \n');

if(d==1)

a_qwav=0.025;

d_qwav=0.066;

t_qwav=0.166;

else

a_qwav=input('amplitude = ');

d_qwav=input('duration = ');

t_qwav=0.166;

d=0;

end

%qrs wave specifications

fprintf('\n\nqrs wave specifications\n');

d=input('Enter 1 for default specification else press 2: \n');

if(d==1)

a_qrswav=1.6;

d_qrswav=0.11;

else

a_qrswav=input('amplitude = ');

d_qrswav=input('duration = ');

d=0;

end

%s wave specifications

fprintf('\n\ns wave specifications\n');

d=input('Enter 1 for default specification else press 2: \n');

if(d==1)

a_swav=0.25;

d_swav=0.066;

t_swav=0.09;

else

a_swav=input('amplitude = ');

d_swav=input('duration = ');

t_swav=0.09;

d=0;

end

%t wave specifications

fprintf('\n\nt wave specifications\n');

d=input('Enter 1 for default specification else press 2: \n');

if(d==1)

a_twav=0.35;

d_twav=0.142;

t_twav=0.2;

else

a_twav=input('amplitude = ');

d_twav=input('duration = ');

t_twav=input('s-t interval = ');

d=0;

end

%u wave specifications

fprintf('\n\nu wave specifications\n');

d=input('Enter 1 for default specification else press 2: \n');

if(d==1)

a_uwav=0.035;

d_uwav=0.0476;

t_uwav=0.433;

else

a_uwav=input('amplitude = ');

d_uwav=input('duration = ');

t_uwav=0.433;

d=0;

end

end

pwav=p_wav(x,a_pwav,d_pwav,t_pwav,li);

%qwav output

qwav=q_wav(x,a_qwav,d_qwav,t_qwav,li);

%qrswav output

qrswav=qrs_wav(x,a_qrswav,d_qrswav,li);

%swav output

swav=s_wav(x,a_swav,d_swav,t_swav,li);

%twav output

twav=t_wav(x,a_twav,d_twav,t_twav,li);

%uwav output

uwav=u_wav(x,a_uwav,d_uwav,t_uwav,li);

%ecg output

ecg=pwav+qrswav+twav+swav+qwav+uwav;

figure(1)

plot(x,ecg);

p_wav(x,a_pwav,d_pwav,t_pwav,li)

function [pwav]=p_wav(x,a_pwav,d_pwav,t_pwav,li)

l=li;

a=a_pwav;

x=x+t_pwav;

b=(2*l)/d_pwav;

n=100;

p1=1/l;

p2=0;

for i = 1:n

harm1=(((sin((pi/(2*b))*(b-(2*i))))/(b-(2*i))+(sin((pi/(2*b))*(b+(2*i))))/(b+(2*i)))*(2/pi))*cos((i*pi*x)/l);

p2=p2+harm1;

end

pwav1=p1+p2;

pwav=a*pwav1;

qrs_wav(x,a_qrswav,d_qrswav,li)

function [qrswav]=qrs_wav(x,a_qrswav,d_qrswav,li)

l=li;

a=a_qrswav;

b=(2*l)/d_qrswav;

n=100;

qrs1=(a/(2*b))*(2-b);

qrs2=0;

for i = 1:n

harm=(((2*b*a)/(i*i*pi*pi))*(1-cos((i*pi)/b)))*cos((i*pi*x)/l);

qrs2=qrs2+harm;

end

qrswav=qrs1+qrs2;

q_wav(x,a_qwav,d_qwav,t_qwav,li)

function [qwav]=q_wav(x,a_qwav,d_qwav,t_qwav,li)

l=li;

x=x+t_qwav;

a=a_qwav;

b=(2*l)/d_qwav;

n=100;

q1=(a/(2*b))*(2-b);

q2=0;

for i = 1:n

harm5=(((2*b*a)/(i*i*pi*pi))*(1-cos((i*pi)/b)))*cos((i*pi*x)/l);

q2=q2+harm5;

end

qwav=-1*(q1+q2);

s_wav(x,a_swav,d_swav,t_swav,li)

function [swav]=s_wav(x,a_swav,d_swav,t_swav,li)

l=li;

x=x-t_swav;

a=a_swav;

b=(2*l)/d_swav;

n=100;

s1=(a/(2*b))*(2-b);

s2=0;

for i = 1:n

harm3=(((2*b*a)/(i*i*pi*pi))*(1-cos((i*pi)/b)))*cos((i*pi*x)/l);

s2=s2+harm3;

end

swav=-1*(s1+s2);

t_wav(x,a_twav,d_twav,t_twav,li)

function [twav]=t_wav(x,a_twav,d_twav,t_twav,li)

l=li;

a=a_twav;

x=x-t_twav-0.045;

b=(2*l)/d_twav;

n=100;

t1=1/l;

t2=0;

for i = 1:n

harm2=(((sin((pi/(2*b))*(b-(2*i))))/(b-(2*i))+(sin((pi/(2*b))*(b+(2*i))))/(b+(2*i)))*(2/pi))*cos((i*pi*x)/l);

t2=t2+harm2;

end

twav1=t1+t2;

twav=a*twav1;

u_wav(x,a_uwav,d_uwav,t_uwav,li)

function [uwav]=u_wav(x,a_uwav,d_uwav,t_uwav,li)

l=li;

a=a_uwav

x=x-t_uwav;

b=(2*l)/d_uwav;

n=100;

u1=1/l

u2=0

for i = 1:n

harm4=(((sin((pi/(2*b))*(b-(2*i))))/(b-(2*i))+(sin((pi/(2*b))*(b+(2*i))))/(b+(2*i)))*(2/pi))*cos((i*pi*x)/l);

u2=u2+harm4;

end

uwav1=u1+u2;

uwav=a*uwav1;


Related Solutions

hi i need a code that will give me this output, For the multiply_list, the user...
hi i need a code that will give me this output, For the multiply_list, the user will be asked to input the length of the list, then to input each element of the list. For the repeat_tuple, the user is only asked to enter the repetition factor, but not the tuple. Your program should take the list created before and convert it to a tuple. output expected: (**user input**) ******Create your List ****** Enter length of your list: 3 ******...
I need a matlab code for my presentation. Code should include Single Sideband Amplitude Modulation and...
I need a matlab code for my presentation. Code should include Single Sideband Amplitude Modulation and Demodulation. It should figure 3 things: -time domain of given message signal in Amplitude Modulation and Single Sideband Amplitude Modulation -frequency domain of given signal in Amplitude Modulation and Single Sideband Amplitude Modulation -And it should demodulate and show message signal.
Show the code in matlab to display an ECG graph (I do not want code that...
Show the code in matlab to display an ECG graph (I do not want code that simply calls the ecg function in matlab but how to write that kind of code)
matlab code to graph an ecg
matlab code to graph an ecg
i need matlab code of heat equation in 1D with convection ?
i need matlab code of heat equation in 1D with convection ?
Hi there, I need mpx2100ap arduino code do I need an amplifier to make this work...
Hi there, I need mpx2100ap arduino code do I need an amplifier to make this work ?
Hi. I want matlab code that implements a mimo system that uses the mmse and zf...
Hi. I want matlab code that implements a mimo system that uses the mmse and zf methods with Rayleigh fading. Thank you.
Hi, I asked a similar question yesterday and the answer was amazing. However, this is a...
Hi, I asked a similar question yesterday and the answer was amazing. However, this is a case study so I need relevant data / real cases / real examples and information on these issues. I am struggling to find any key sources for any of these question (only need to do 1 question but in depth, about 3000 words). Thanks Write a report on trade, employment and wages in Vietnam. Write a report on disinflation, fiscal sustainability and economics growth...
pls, I need Matlab code for, OFDM modulation (Matlab demo by at least 4 carriers)
pls, I need Matlab code for, OFDM modulation (Matlab demo by at least 4 carriers)
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft...
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft and dft. Applied to discrete signals. If you can with an example.Thank you!!
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT