|
From: | Márcio Diniz |
Subject: | sage and Octave |
Date: | Thu, 29 Sep 2011 15:22:37 -0300 |
On 29 September 2011 11:47, george brida <address@hidden> wrote:The symbolic packge doesn't have symbolic matrices implemented yet.
> Dear Octavers,
> I have the following matrix A:
> A(1,1)=T ; A(1,2)=T*(T+1)/2 ;
> A(2,1)=T*(T+1)/2 ; A(2,2)= T*(T+1)*(2*T+1)/6
>
> I would like to find the inverse of this matrix in this general form.
This is how to do it in Sage instead:
sage: t = var('t')
sage: X = matrix([ [t, t*(t+1)/2], [t*(t+1)/2, t*(t+1)*(2*t+1)/6]])
sage: X
[ t 1/2*(t + 1)*t]
[ 1/2*(t + 1)*t 1/6*(t + 1)*(2*t + 1)*t]
sage: X.inverse()
[-3*(t + 1)^2/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t) + 1/t
6*(t + 1)/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t)]
[6*(t + 1)/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t)
-12/(3*(t + 1)^2*t - 2*(t + 1)*(2*t + 1)*t)]
HTH,
- Jordi G. H.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |