Hello, Ben Logan and the group! The file I attached solves partly the problem. For example, (C2) to(by(1,1/2),3); 1 [1, -, 2, 3] 2 3 5 (D2) [1, -, 2, -, 3] 2 2 (C3) Unfortunately, I failed to make to and by infix operators due to the following unwanted behaveiour of Maxima: (C1) infix("x"); (D1) "X" (C2) part(1 x 2, 0); (D2) X (C3) '(x);Incorrect syntax: X is not a prefix operator '(x ^ (C3) Incorrect syntax: Illegal use of delimiter ) ) ^ (C3) Incorrect syntax: Premature termination of input at ;. ; ^ (C3) So, how can check, if part(1 by 2,) equals to symbol by? -- Andrei Zorine Ben Logan wrote: > 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 >
Attached file: seq.mac