help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to use for loop and convert summation in code


From: preeti gaikwad
Subject: how to use for loop and convert summation in code
Date: Mon, 10 Oct 2011 10:30:59 +0200

Hello I am the new user of octave and getting problem in using for loop for value N=-10 to 10......using the code for the same

..............................

N=10;

for i=N:-1:1

Taui=0.2;

L=4.08;% in mm

li=2; %inelastic absorption length in mm

lt=0.5; %scattering length in mm

R=0.5; %reflection coefficient

D=li^2/Taui;% diffusion constant


z0 = (2/3)*lt*(1+R)/(1-R);

ze = (li/2)*log((1+(1/li)*z0)/(1-(1/li)*z0));

zp = ze;

 

A=(1-2*i)*(L+2*ze)-2*(zp+lt); B=(2*i+1)*(L+2*ze);

T=exp(-(x./Taui))./(4.*x.*(4.*pi.*x.*D).^(3./2)).*(A.*exp([(-(A^2))/4*D.*x])-B*exp([(-B^2)/4*D.*x]));


 end

......................................................................................................................................................

so basically I find that my loop is not working why not getting it....could u please help me?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]