[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: New to Octave
From: |
jweitz |
Subject: |
RE: New to Octave |
Date: |
Mon, 25 Jan 2010 06:15:36 -0800 (PST) |
Neil.Francis wrote:
>
>> 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
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>
That fixed it thanks. I guess the book had a typo.
--
View this message in context:
http://old.nabble.com/New-to-Octave-tp27301513p27307229.html
Sent from the Octave - General mailing list archive at Nabble.com.