[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: New to Octave
From: |
Neil.Francis |
Subject: |
RE: New to Octave |
Date: |
Mon, 25 Jan 2010 14:37:52 +0800 |
> octave-3.0.5:2> dt = 1/100;
> octave-3.0.5:3> tt = -1 : dt : 1;
> octave-3.0.5:4> Fo = 2;
> octave-3.0.5:5> xx = 300*real( exp( j*(2*pi*Fo(tt - 0.75) ) ) );
> error: expecting integer index, found -1.750000
In your line 5 you appear to be trying to index a vector called "Fo". The
result of (tt - 0.75) is not an integer and can't be used as an index to "Fo".
As Fo isn't a vector, maybe you wanted to instead write "Fo*(tt - 0.75)" there?
Neil