Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how reformat a symbolic expression in Scilab

256 views
Skip to first unread message

workaholic

unread,
Oct 13, 2009, 11:23:58 AM10/13/09
to
The existen msprintf() can turn a numerical value into string, but
when I use the Scilab Symbolic Toolbox, with an integration of Maxima,
I obtain an expression, but how can I put them into a string or a
file?

Often I get the error message below:

-->str = msprintf("%s",s)
!--error 246
function not defined for given argument type(s),
check arguments or define function %sym_msprintf for overloading

Obviously the function do not support that type,since the toolbox is
nonofficial. how to deal with problem?

Thanks in advance!

philippe

unread,
Oct 13, 2009, 5:02:59 PM10/13/09
to
Hi,

workaholic a �crit :


> The existen msprintf() can turn a numerical value into string, but
> when I use the Scilab Symbolic Toolbox, with an integration of Maxima,

which one? the one by C. Denizet :

http://www.scilab.org/contrib/index_contrib.php?page=displayContribution&fileID=1230

or the one by J.F Magni :

http://www.cert.fr/dcsd/idco/perso/Magni/toolboxes.html#symbolic


I've only tested the second one, because there is not yet a windows
version for the Denizet's ones ...

> I obtain an expression, but how can I put them into a string or a
> file?

In the J.F Magni toolbox symbolyc objects are mlist defined as :

a = mlist(['sym';'str1'],'a')

so you can retrieve the string defining the maxima symbolic object by

a.str1

see the example below ... If you use the other toolbox contact C.
Denizet he will be happy to answer your questions!

Philippe.

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

-->syms x

-->G=diff((x-1)/(x-2),x)
G =


1/(x-2)-(x-1)/(x-2)^2

-->G.str1
ans =

1/(x-2)-(x-1)/(x-2)^2

-->typeof(G.str1)
ans =

string
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

calixte

unread,
Oct 13, 2009, 6:21:43 PM10/13/09
to
Hello,

On 13 oct, 23:02, philippe <rou...@tele2.fr> wrote:
> Hi,
>
> workaholic a écrit :


>
> > The existen msprintf() can turn a numerical value into string, but
> > when I use the Scilab Symbolic Toolbox, with an integration of Maxima,
>
> which one? the one by C. Denizet :
>

> http://www.scilab.org/contrib/index_contrib.php?page=displayContribut...
>

The latest version of SciMax and Overload are available here :
http://sourceforge.net/projects/scilabtbxset/files/
For the moment, these toolboxes work fine only under GNU/Linux
systems. You can see a demo here : http://www.youtube.com/watch?v=C8NHqEUYz2w&translated=1
If you're a Windows user, you can try them in installing Virtual Box
and a GNU/Linux distro.

> or the one by J.F Magni :
>
> http://www.cert.fr/dcsd/idco/perso/Magni/toolboxes.html#symbolic
>
> I've only tested the second one, because there is not yet a windows
> version for the Denizet's ones ...
>

Please Philippe, install GNU/Linux on your computer (Virtual Box is
for you) and I'll offer you a beer.

> > I obtain an expression, but how can I put them into a string or a
> > file?
>
> In the J.F Magni toolbox symbolyc objects are mlist defined as :
>
> a = mlist(['sym';'str1'],'a')
>
> so you can retrieve the string defining the maxima symbolic object by
>
> a.str1
>
> see the  example  below ... If you use the other toolbox contact C.
> Denizet he will be happy to answer your questions!
>
> Philippe.
>

Calixte

calixte

unread,
Oct 13, 2009, 6:41:38 PM10/13/09
to
Hello,

On 13 oct, 17:23, workaholic <liua...@gmail.com> wrote:
> The existen msprintf() can turn a numerical value into string, but
> when I use the Scilab Symbolic Toolbox, with an integration of Maxima,
> I obtain an expression, but how can I put them into a string or a
> file?
>
> Often I get the error message below:
>
> -->str = msprintf("%s",s)
>                        !--error 246
> function not defined for given argument type(s),
>   check arguments or define function %sym_msprintf for overloading
>

If you use SciMax, you can get the string (or matrix of strings) with
s.rep or in using the tilde operator, ~s returns the representation of
the symbol. You have also the functions latex and mathml which return
resp. latex code of your expression and mathml code.

> Obviously the function do not support that type,since the toolbox is
> nonofficial. how to deal with problem?
>
>  Thanks in advance!

Calixte Denizet

workaholic

unread,
Oct 14, 2009, 8:52:35 PM10/14/09
to
On Oct 14, 5:02 am, philippe <rou...@tele2.fr> wrote:
> Hi,
>
> workaholic a écrit :
>
> > The existen msprintf() can turn a numerical value into string, but
> > when I use the Scilab Symbolic Toolbox, with an integration of Maxima,
>
> which one? the one by C. Denizet :
>
> http://www.scilab.org/contrib/index_contrib.php?page=displayContribut...

Thanks a lot! I mean the second one. My great respect to the author.

workaholic

unread,
Oct 14, 2009, 8:53:25 PM10/14/09
to

Thanks,that is my first time to know that toolbox, I will have it a
try

0 new messages