[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
for statement not working in __bodequist__.m
From: |
withaar |
Subject: |
for statement not working in __bodequist__.m |
Date: |
Tue, 08 Apr 2003 14:23:03 +0100 |
I am not sure this is a bug, paerhaps something in my configuration.
When I execute the following:
S = tf2sys(1,[0.8 10 1]);
bode(S)
I get errors. The error occurs in the following section of
__bodequist__.m:
for ii=bigpts
if(npts(ii))
wtmp = logspace(w1(ii),w2(ii),npts(ii));
wseg(ii,1:(npts(ii)-2)) = wtmp(2:(npts(ii)-1));
endif
endfor
It turns out loop variable ii gets assigned the entire vector bigpts. Why
does
this not work? It should. When I change it to this it works:
for ik=1:length(bigpts)
ii = bigpts(ik);
if(npts(ii))
wtmp = logspace(w1(ii),w2(ii),npts(ii));
wseg(ii,1:(npts(ii)-2)) = wtmp(2:(npts(ii)-1));
endif
endfor
This is octave 2.1.46.
cheers,
Willem Atsma
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- for statement not working in __bodequist__.m,
withaar <=