[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
storing values generated in a 'for'loop
From: |
asha g |
Subject: |
storing values generated in a 'for'loop |
Date: |
Wed, 23 Apr 2008 18:23:53 -0700 (PDT) |
I have a program in which I am iterating V from -80 to
80 to generate values of n. then I have to plot n vs
V.
I wrote
for iter = -80:10:80
V= iter;
[alphan,betan,alphah,betah,alpham,betam]= ratcon(V);
[n,m,h] =
gatpara2(alphan,betan,alphah,betah,alpham,betam);
n(iter) = n;
m(iter)= m;
h(iter)= h;
V(iter) = V;
end
plot(V,n,'r')
The problem I am having is that the command
n(iter) = n; generates an error message saying
subscript indexes must be real positive integers or
logicals.
How do I write those statements in order that they
store all values of n,m,h and V during the iteration?
I am not sure if you need the function files too to
help me. If so, can send them.
Thanks for your help.
Asha
Goals too clearly defined can become blinkers.
Mary Catherine Bateson
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
- storing values generated in a 'for'loop,
asha g <=