why plot not generate for the following codes?
1 view (last 30 days)
Show older comments
help please
1.short form of this codes
2.plot of Vnorm and ketalpha
0 Comments
Accepted Answer
Torsten
on 14 Jan 2023
creation = 1;
syms n
alpha = sym(0.03);
ketalpha1 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10);
syms n
alpha = sym(0.06);
ketalpha2 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10);
syms n
alpha = sym(0.09);
ketalpha3 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10);
syms n
alpha = sym(0.12);
ketalpha4 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10);
syms n
alpha = sym(0.15);
ketalpha5 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10);
syms n
alpha = sym(0.18);
ketalpha6 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10);
V1=creation*ketalpha1-0.03*ketalpha1;
V2=creation*ketalpha2-0.06*ketalpha2;
V3=creation*ketalpha3-0.09*ketalpha3;
V4=creation*ketalpha4-0.12*ketalpha4;
V5=creation*ketalpha5-0.15*ketalpha5;
V6=creation*ketalpha5-0.18*ketalpha5;
Vnorm1=V1'*V1;
Vnorm2=V2'*V2;
Vnorm3=V3'*V3;
Vnorm4=V4'*V4;
Vnorm5=V5'*V5;
Vnorm6=V6'*V6;
ketalpha=[ketalpha1;ketalpha2;ketalpha3;ketalpha4;ketalpha5;ketalpha6];
Vnorm=[Vnorm1;Vnorm2;Vnorm3;Vnorm4;Vnorm5;Vnorm6];
plot(Vnorm,ketalpha)
More Answers (0)
See Also
Categories
Find more on Quantum Mechanics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!