It's clear to me now.
I got confused about x[m] and x[2] ...
..........................
y=m^2;
define (x[m],rhs(%));
x[m];
x[2];
z=m^3;
define (x[m],rhs(%));
x[m];x[2]; " x[m] and x[2] doesn't change, only with kill(x)";
x[3];x[4];x[n];
...............................
thanks.
Date: Mon, 16 Dec 2013 09:31:41 -0500
Subject: Re: [Maxima] define (basic)
From: macrakis at alum.mit.edu
To: rcrdjf at hotmail.com
CC: maxima at math.utexas.edu
I think you are leaving out the step that caused your problem, which is why Jaime couldn't reproduce it. When reporting bugs, please be sure that your problem is repeatable with the exact procedure you are reporting. Also, please report the full Maxima version using build_info().
Here is what I think happened:
y=m^2;define (x[m],rhs(%)); x[m];
x[m] => m^2 <<< this is the step you left out
z=m^3;
define (x[m],rhs(%)); x[m];
Defining x[m] as a function defines a memoizing function; once a value has been calculated for a given value, it saves it and doesn't recalculate it. To reset that, do kill(x). That kills all definitions attached to x.
-s
On Mon, Dec 16, 2013 at 8:35 AM, Ricardo JF <rcrdjf at hotmail.com> wrote:
Hi friends,
why x[m] doesn't change to m^3
........
y=m^2;
define (x[m],rhs(%)); x[m];
z=m^3;
define (x[m],rhs(%)); x[m];
........
why x[m]=m^2 ?
thanks.
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima