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??
Best Answer