Greetings, and a question about sequences.



Hello, everyone.

I am new to the list and relatively new to Maxima, though I am not a
total newbie.  I have just started a technical calculus course, which
requires the use of Matlab, at a local college.  I asked my professor
if I could substitute Maxima, and he said that would be okay--as long
as I complete the worksheets, he doesn't care which CAS I use.  I am
using Maxima version 5.9.0 with GCL on a Redhat 8.0 system (i686).  I
am familiar with programming in various high-level languages, but lisp
is unfortunately not one of them (yet).

There is a document called "Matlab Basics" which I downloaded as part
of my calc course, and I was looking through it trying to find the
Maxima equivalents.  (If anyone wants to take a look, it is here:
http://www.nr.edu/chalmeta/175/MatLab_Basics.pdf -- it isn't necessary
to look at it to help me, though.)

Here is my problem: in Matlab, you set up an array of values in a
simple manner by using the ':' operator.  E.g.,

x=2:4

yields

x = 2 3 4

Or you can give a step value:

x=2:.5:4

yields

x = 2.0000 2.5000 3.0000 3.5000 4.0000

I have searched through the Maxima info pages, the docs on the
website, and the 2003 mailing list archives, but I have not found an
equivalent way to do this in Maxima.  I found out how to create a
list:

x:[2,4,6];

But is there any way to automatically fill it with a sequence?  I
tried using a FOR loop, but ran into problems with variable scope.
Plus, that seems a little cumbersome unless there is no other way.

Your help is greatly appreciated.  I'm sure I'll have more questions
before my class is over. :-)

Thanks,
Ben

-- 
Ben Logan
Google Answers Researcher
answers.google.com
When you're searching for information, Google Answers.

... ich bin in einem dusenjet ins jahr 53 vor chr ... ich lande im
antiken Rom ...  einige gladiatoren spielen scrabble ... ich rieche
PIZZA ...