matrix with parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

matrix with parameters

f.g.fornari
hello,

I'm a new user...hope you can help me getting started! (of course I've tried to look for the answer before writing)
I need to work with a matrix with parameters, but I don't know how can I do it (if it's possible)

is there a way to calc a determinant of a matrix with an undefined parameter??

for example
A=[a,0;0,a]
i'd like to ask Octave to calc det (A), and have as an answer a^2...
matrixes I'm working with are much more complex, and with more parameters...any way to work with them?

hope you can help...
thank you all!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matrix with parameters

Sebastian Schöps
f.g.fornari wrote
 there a way to calc a determinant of a matrix with an undefined parameter??
Octave is meant for numerical computations (numbers, not symbols) in contrast to calculations of computer algebra systems. You can do a a lot symbolic operations in Octave when installing the corresonding package [1]. However, for your determinants you should probably consider using Maxima [2] or Mathematica/Maple (non-fee). For simple calculations Wolfram Alpha is also often useful.

Sebastian



[1] https://wiki.octave.org/Symbolic_package
[2] http://maxima.sourceforge.net/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matrix with parameters

f.g.fornari
thanks Sebastian.
i didn't understand if symbolic package can work with such matrix or not.
anyway, I've just downloaded maxima, and trying to work with that.


2017-07-01 12:11 GMT+02:00 Sebastian Schöps [via Octave] <[hidden email]>:
f.g.fornari wrote
 there a way to calc a determinant of a matrix with an undefined parameter??
Octave is meant for numerical computations (numbers, not symbols) in contrast to calculations of computer algebra systems. You can do a a lot symbolic operations in Octave when installing the corresonding package [1]. However, for your determinants you should probably consider using Maxima [2] or Mathematica/Maple (non-fee). For simple calculations Wolfram Alpha is also often useful.

Sebastian



[1] https://wiki.octave.org/Symbolic_package
[2] http://maxima.sourceforge.net/


If you reply to this email, your message will be added to the discussion below:
http://octave.1599824.n4.nabble.com/matrix-with-parameters-tp4683959p4683960.html
To unsubscribe from matrix with parameters, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matrix with parameters

Colin Macdonald-2
On 01/07/17 03:37 AM, f.g.fornari wrote:
> thanks Sebastian.
> i didn't understand if symbolic package can work with such matrix or not.
> anyway, I've just downloaded maxima, and trying to work with that.

Good luck.  In case you do want to try again with Octave and the
Symbolic pkg:

 >> pkg load symbolic

 >> syms a

 >> A = [a, 0; 0, a]
A = (sym 2×2 matrix)

   ⎡a  0⎤
   ⎢    ⎥
   ⎣0  a⎦

 >> det(A)
ans = (sym)

    2
   a

best,
Colin

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matrix with parameters

Sebastian Schöps
Colin Macdonald-2 wrote
On 01/07/17 03:37 AM, f.g.fornari wrote:
Good luck.  In case you do want to try again with Octave and the
Symbolic pkg:

 >> pkg load symbolic

 >> syms a

 >> A = [a, 0; 0, a]
A = (sym 2×2 matrix)

   ⎡a  0⎤
   ⎢    ⎥
   ⎣0  a⎦

 >> det(A)
ans = (sym)

    2
   a
Thanks Colin for giving the Octave example. In my experience, it's often better to clearly seperate between numerics and symbolics (even though reality is nowadys rather grey than black&white). This is not meant to discredite the symbolic package.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matrix with parameters

Colin Macdonald-2
On 01/07/17 10:15 AM, Sebastian Schöps wrote:
> Thanks Colin for giving the Octave example. In my experience, it's often
> better to clearly seperate between numerics and symbolics (even though
> reality is nowadys rather grey than black&white). This is not meant to
> discredite the symbolic package.

I agree completely.  Its probably a widely-held view, but I cite Rob
Corless (as someone who has worked extensively in both areas).

Colin

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Loading...