[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
error:expecting integer index
From: |
David S. Brown |
Subject: |
error:expecting integer index |
Date: |
Sun, 30 Jan 2005 20:22:57 -0800 (PST) |
Hi,
I am trying to do something similar to the following
but get the error:
GNU Octave, version 2.1.57 (i386-pc-linux-gnu).
octave:1> fn = input(' ','s');
sin(x)
octave:2> f2 = inline(fn);
octave:3> x=-pi:.01:pi;
octave:4> y=f2(x);
error: expecting integer index, found -3.141593
error: evaluating assignment expression near line 4,
column 2
so as I understand, it and I want x(1) to equal -pi
but instead it is doing x(-pi). How do I write this
so it is indexing x(1) trough length(x)?
Thanks,
Dave
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
-------------------------------------------------------------
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
-------------------------------------------------------------
- error:expecting integer index,
David S. Brown <=