extracting 'pieces' of vector element



The rhs of something that isn't an equation is 0;  the lhs of something that isn't an equation is itself. Examples:

  (%i6) rhs(a);
  (%o6) 0

  (%i7) lhs(a);
  (%o7) a

I think you want rhs(first(y)):

  (%i9) y : [N=26.5];
  (%o9) [N=26.5]

  (%i10) rhs(first(y));
  (%o10) 26.5

--Barton
________________________________
From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on behalf of Evan Cooch [evan.cooch at gmail.com]
Sent: Wednesday, October 31, 2012 19:06
To: 'Maxima List'
Subject: extracting 'pieces' of vector element

Suppose I have the element of some structure (say a vector), which is an expression.

e.g.,  [N=26.5]

I want to 'grab' the rhs of the expression (i.e., the number 26.5), but can't figure out how. Suppose the preceding is assigned to Y

I thought the following would work

rhs(Y);

but it keeps returning 0.

I'm obviously missing something.

Thanks in advance for pointers to the obvious.