Storing decimal numbers in for loop: getting a single vector
显示 更早的评论
I want to store decimal numbers in the for loop.
for e = 0:0.1:1
k = sqrt(2.*e);
q = sqrt(2.*(e+(V0./2)));
r = sqrt (2.*(e+V0));
a = ((r+q+(2.*s1.*lambda)).*(k+q+(2.*s1.*lambda)).*expm(s1.*(r-q).*0.48)) - ((r-q+ (2.*s1.*lambda)).*(k-q+2.*s1.*lambda).*expm(s1.*(r+q).*0.48));
Trans = (4.*k.*q)./a;
wfn = Trans.*conj(Trans);
posit1(e,1) = e;
wfn1(e,1) = wfn;
end
plot( posit1, wfn1);
I want to store all the values from 0 to 1 with an interval of 0.1 Please help me how to do it??
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!