Date: Jul 8, 2013 4:24 AM
Author: george veropoulos
Subject: xls  file  in matlab

Dear  friend  

i run the following code in matlab


spin=1/2;
r_parallel=10;
theta=0;
n=1;
l=0;
yi=1;
B=ones(size(10000));
Enl=ones(size(10000));
wave_function=ones(size(10000));
for i=0:5
B=i;
[wave_function,Enl]=psi_parallel(r_parallel,theta,n,l,spin,yi,B);

xlswrite('results.xlsx', B,'sheet1','A')
xlswrite('results.xlsx',Enl,'sheet1','B')
end


the problem is that in xls(RESULTS) file i have ONLY one value
for B=5 NOT ALL THE VALUES .(i=0,1,3,5 )

please help me
thank you in advance