[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: symbolic, lazy Min
From: |
Colin Macdonald |
Subject: |
Re: symbolic, lazy Min |
Date: |
Thu, 25 Oct 2018 09:59:46 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 2018-10-25 9:05 a.m., CS Suehs wrote:
Greetings, all,
I have been experiencing some pain trying to use sympy's Min from
Octave's symbolic
math capabilities. I have not been able to figure out how to dissuade
Octave from eagerly evaluating the Min. I want an expression with a Min
in it, not an immediate attempt to evaluate the two expressions. I
wonder, if Octave is confusing it with its own min, or failing to
translate the sym min to sympy's Min. Perhaps, in my ignorance, I am
not correctly specifying the exact Min.
Probably this is because min(x,y) does not work correctly yet [1].
Here is a workaround:
>> syms x y
>> A = python_cmd('return Min(*_ins)', x, y)
>> syms p positive
>> B = python_cmd('return Min(*_ins)', p, 2*p)
I think [1] would be easy to fix properly and I'd love some help! Just
find "@sym/min.m" and edit it. It needs to call sympy's "Min()" like
the above examples.
[1] https://github.com/cbm755/octsympy/issues/876
Colin