help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## sage and Octave

 From: Márcio Diniz Subject: sage and Octave Date: Thu, 29 Sep 2011 15:22:37 -0300

Dear Jordi,

Using the opportunity: do you know a document/tutorial that teach how to use Octave(and R, hopefully) and Sage simultaneously?
I don't think "simultaneoously" is the best word, perhaps conjointly is a better word.
Thanks.

Regards,
M.Diniz

2011/9/29 Jordi Gutiérrez Hermoso
On 29 September 2011 11:47, george brida <address@hidden> wrote:
> 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.

The symbolic packge doesn't have symbolic matrices implemented yet.
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

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]