Hello Stavros,
thank you very much for your answer, which helped me to make a list
with variables as elements.
Best regards
Sara
Am 29. M?rz 2012 15:35 schrieb Stavros Macrakis <macrakis at alum.mit.edu>:
> Sara,
>
> The real problem here is probably that you have run into a bug in
> fourier_elim, which does not appear to allow subscripted variables (though
> subscripted variables should work exactly like unsubscripted variables):
>
> ? ? ? ? ? fourier_elim( [a1>1], [a1] ) => [1<a1] ? ? ? ? ? <<< OK
> ? ? ? ? ? fourier_elim( [a[1]>1], [a[1]] ) => ?Maxima encountered a Lisp
> error ? <<< bug!
>
> A workaround for this is to use concat to generate pseudo-subscripted
> variables:
>
> ? ? ? ? ? fourier_elim( [ concat('a,1) >1], [ concat('a,1) ] ) => ?[1<a1]
>
> You can automate this by defining:
>
> ? ? ? ? ? a[i]:= concat('a,i)$
> ? ? ? ? ? fourier_elim( [a[1]>1], [a[1]] ) ?=> [1<a1]
>
> Tested in
>
> Maxima version: 5.26.0
> Maxima build date: 13:32 1/18/2012
> Host type: i686-apple-darwin11.2.0
> Lisp implementation type: SBCL
> Lisp implementation version: 1.0.52.0-11e4aa5
>
> ? ? ? ? ? -s
>
>
>
>
>
>
> On Thu, Mar 29, 2012 at 09:15, Sara Pashmin <sarapashm at googlemail.com>
> wrote:
>>
>> Hello Christopher and David,
>>
>> thanks for your answer.
>>
>> I try to solve a loop for example like this:
>>
>> A: makelist(i*0.1,i,0,75);
>>
>> for i:1 thrue length(A) step 1 do
>>
>> fourier_elim( [A[i]-B[i]+C[i]>2, A[i]+B[i]<4] , [ B[i], C[i] ]);
>>
>> At the beginning I wantet to make a list for B and C with the same
>> size, but now I understand that the list of B and C can not be empty.
>> I should define variable for their elements like [x,y,z,t,...].
>>
>> Best regards
>>
>> Sara
>>
>> Am 29. M?rz 2012 14:48 schrieb David Billinghurst <dbmaxima at gmail.com>:
>> > On 29/03/2012 11:32 PM, Sara Pashmin wrote:
>> >>
>> >> I would like to know please how to make a "empty" list with for
>> >> example 76 elements?
>> >
>> > Is this what you want?
>> >
>> > (%i1) makelist([],i,0,75);
>> > (%o1) [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [],
>> > [],
>> > [],
>> > [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [],
>> > [],
>> > [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [],
>> > [],
>> > [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [],
>> > [],
>> > []]
>> >
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>