transferring an equation from maxima to octave

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

transferring an equation from maxima to octave

insafba
Hello there,
I calculated a long function using Maxima software, and I want to copy it to
Octave so I can use it properly. How should I do it? I'll appreciate any
help you could provide me
Thank you so much



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4


On Sun, Jan 13, 2019, 8:03 AM insafba <[hidden email] wrote:
Hello there,
I calculated a long function using Maxima software, and I want to copy it to
Octave so I can use it properly. How should I do it? I'll appreciate any
help you could provide me
Thank you so much



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Ok 

Copy and paste  🙄


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4
In reply to this post by insafba


On Sun, Jan 13, 2019, 8:03 AM insafba <[hidden email] wrote:
Hello there,
I calculated a long function using Maxima software, and I want to copy it to
Octave so I can use it properly. How should I do it? I'll appreciate any
help you could provide me
Thank you so much



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


 
Can you show us the equation?


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

insafba
In reply to this post by Doug Stewart-4
Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

insafba
<http://octave.1599824.n4.nabble.com/file/t373159/fct_maxima.png>
here is it! this is a multivariable function. the variables are p, pp, d dd,
and r



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4


On Sun, Jan 13, 2019, 8:15 AM insafba <[hidden email] wrote:
<http://octave.1599824.n4.nabble.com/file/t373159/fct_maxima.png>
here is it! this is a multivariable function. the variables are p, pp, d dd,
and r



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

 
You must add a * where you want multiplication. 


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4


On Sun, Jan 13, 2019, 8:19 AM Doug Stewart <[hidden email] wrote:


On Sun, Jan 13, 2019, 8:15 AM insafba <[hidden email] wrote:
<http://octave.1599824.n4.nabble.com/file/t373159/fct_maxima.png>
here is it! this is a multivariable function. the variables are p, pp, d dd,
and r



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

 
You must add a * where you want multiplication.  And a ^ for power like this x^2  etc.


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

insafba
In reply to this post by Doug Stewart-4
but what about the variables themselves? I don't want to specify a value for
each one, but to use the function as a fitting model, i.e. determine the
variables according to a set of data that I have. It's almost like symbolic
calculation in Matlab.
I hope my problem is clear



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4


On Sun, Jan 13, 2019, 8:25 AM insafba <[hidden email] wrote:
but what about the variables themselves? I don't want to specify a value for
each one, but to use the function as a fitting model, i.e. determine the
variables according to a set of data that I have. It's almost like symbolic
calculation in Matlab.
I hope my problem is clear



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

 
If you can do  it  in matlab then try the same thing here in octave.


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

insafba
well, I know that there is a possibility in Matlab, but unfortunately, I
don't have it on my pc :(



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4


On Sun, Jan 13, 2019, 8:43 AM insafba <[hidden email] wrote:
well, I know that there is a possibility in Matlab, but unfortunately, I
don't have it on my pc :(



There are some people here that will do it all for you for a fee. Is it import enough for that?



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html




Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

insafba
I want to do it myself, I just need a little bit of help



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Torsten-3
In reply to this post by insafba
On 13.01.19 14:02, insafba wrote:
> Hello there,
> I calculated a long function using Maxima software, and I want to copy it to
> Octave so I can use it properly. How should I do it? I'll appreciate any
> help you could provide me
> Thank you so much
>

You can try to apply the maxima functions "string()" or "fortran()" to
your results in order to get expresions that are almost matlab/octave
compatible.

Torsten



Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Robert Funnell
In reply to this post by insafba
On Sun, 13 Jan 2019, insafba wrote:

> I want to do it myself, I just need a little bit of help

I don't really understand what your problem is. It seems that the
first step is to convert your equation to Octave format as described
earlier (using *, ^, etc.). Presumable the second step is then to
explore the data-fitting functionality available in Octave. Have you
looked at https://octave.sourceforge.io/optim/overview.html, for
example? Is that what you want to do?

- Robert



Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

Doug Stewart-4
In reply to this post by insafba


On Sun, Jan 13, 2019, 9:43 AM insafba <[hidden email] wrote:
I want to do it myself, I just need a little bit of help

 
You should make  the formula work with dummy values for all the unknown.


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

insafba
Thank you so much Torsten-3, that's what I was looking for. Now the equation
could be copied directly to octave without modifying it all manually :)

Thank you also Robert Funnell, I didn't know that package, it seems that is
the same as the symbolic calculation in Matlab. However, when I load the
package symbolic, octave gives me this error :
Symbolic pkg v2.7.1: error: Cannot run the Python executable "python"
    Try "sympref diagnose" for more information.
error: called from
    assert_have_python_and_sympy at line 61 column 7
    python_ipc_popen2 at line 79 column 5
    python_ipc_driver at line 59 column 13
    python_cmd at line 164 column 9
    valid_sym_assumptions at line 38 column 10
    assumptions at line 82 column 7
    syms at line 97 column 13

Doug Stewart-4, I didn't understand your reply, could you please explain
more?



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: transferring an equation from maxima to octave

nrjank
. However, when I load the
package symbolic, octave gives me this error :
Symbolic pkg v2.7.1: error: Cannot run the Python executable "python"
   ...


Octaves symbolic package relies on Python. You just have Python installed and configured properly. If you are on Windows, the package maintainer created a separate symbolic package that includes a standalone version of Python, so you don't need to worry about separate installs.