Martin R wrote:
>
> But I'm still having a very hard time to do even simple stuff without
> parsing a string. For example, if you could show me how to call
>
> guessADE([1,2,3,4,5,6,7])$GUESSINT
>
> it would be really helpful. So far, I was successful with
>
> (|getFunctionFromDomain| '|guessADE| '(|GuessInteger|) '((|List|
> (|Fraction| (|Integer|))))))
>
> but I cannot apply it to a list :-(
Applying is easy. You probably mean that you do not know
how to build list of fractions? In case of fractions
one can cheat: FriCAS Fraction is just a Lisp cons.
In general most of FriCAS types provide "constructor
functions", that is finctions which build elements of
given domain from appropriate data. In case of
Fraction(Integer) you would use '/:(Integer, Integer) -> %'.
So use 'getFunctionFromDomain' to get constructor
function and then use is to build fractions. Collect
fractions into a list and call 'guessADE'. As inline
code this would be quite long, so I do not write it.
It is probably better from the beginning to write
appropriate convertion routines. Once you handle
few basic constructors like Fraction, Polynomial,
Expression, Matrix, Vector, List you will cover
a lot of FriCAS functionality.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.