help-octave
[Top][All Lists]
Advanced

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

Re: Values of V and abm


From: asha g
Subject: Re: Values of V and abm
Date: Mon, 9 Jun 2008 04:45:57 -0700 (PDT)

I made a mistake while typing it. The abmm(iter,:) = abm; and other lines are 
in the loop. 
I still have the problem.
Asha 


> I am having some problems in a program I have written. It is
> pretty long. But the section is :
> 
> N = 10;
> niter = 10000;
> for iter = 1: niter
> 
> [P,S] = timedepcabactoct(Q,V,h2,Iion,deltaT);
> for jj = 2:N-1
> V(jj) = S(jj);
> end 
> if deltaT*niter < 5
> I = 0;
> elseif 5 == deltaT*niter <= 55
> I = 48.4*10^-12;
> V(1) = V(2)+(Ri/Ao)*I*hd;
> V(N) = 4/3*V(N-1)-(1/3)*V(N-2);
> end
> disp(V)
> calling function ratcon2oct
> [alphan,betan,alpham,betam,alphah,betah] = ratcon2oct(V);
> abm = alpham +betam;
> m = m+(deltaT.*(alpham -m.*abm));
> abh = alphah + betah;
> h = h +(deltaT.*(alphah-h.*abh));
> abn = alphan + betan;
> n = n + (deltaT.*(alphan-n.*abn));

> abmm(iter,:)= abm;
> abnn(iter,:)= abn;
> abhh(iter,:)= abh;
> abm1= abmm(iter,1);
end
> t = (1:niter)*deltaT;
> plot(t,abm1)
> 
> warning: implicit conversion from real matrix to real
> scalar
> 
> 
> I need to get an oscillating plot of abm1, abn1 and abh1 vs
> t. But I don't. Instead I get the warning given above
> which I don't follow. Also, if I try to check V at the
> point indicated I get the vector V repeated (N-2) times
> before the values change. I would have expected it to
> change at every iter count. Please tell me if I am writing
> the loop incorrectly. 
> 
> Thanks
> Asha 
> 
> 
>       
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave


      


reply via email to

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