help-octave
[Top][All Lists]
Advanced

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

syms and matrices


From: NZG
Subject: syms and matrices
Date: Mon, 6 Sep 2004 19:30:38 +0000
User-agent: KMail/1.7

I want to create a matrix with undefined symbols in it.
In matlab I do this:
s = sym('s')
mat1 = [s -1 0 0:0 s 0 1:1 0 s 0:0 0 1 s]

mat1 =
   s  -1   0   0
   0   s   0   1
   1   0   s   0
   0   0   1   s


In Octave I tried
s = sym('s')
mat1 = [s -1 0 0;0 s 0 1;1 0 s 0;0 0 1 s]
but it gives me:
error: octave_base_value::array_value(): wrong type argument `ex'
error: evaluating assignment expression near line 28, column 6

Whats the proper way to do this?

thx,
NZG.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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