here is the answer to the first thing. use auto_update=False -

sage: @interact
... def _(A=matrix(QQ,3,3,range(9)), v=matrix(QQ,3,1,range(3)),
auto_update=False):
...     try:
...         x = A\v
...         html('$$%s %s = %s$$'%(latex(A), latex(x), latex(v)))
...     except:
...         html('There is no solution to $$%s x=%s$$'%(latex(A),
latex(v)))

Rajeev


On Tue, May 18, 2010 at 1:50 PM, [email protected] <[email protected]> wrote:

> Dear support, this code is from interact help:
>
> sage: @interact
> ... def _(A=matrix(QQ,3,3,range(9)), v=matrix(QQ,3,1,range(3))):
> ...     try:
> ...         x = A\v
> ...         html('$$%s %s = %s$$'%(latex(A), latex(x), latex(v)))
> ...     except:
> ...         html('There is no solution to $$%s x=%s$$'%(latex(A),
> latex(v)))
>
> If I want to change five numbers in the matrix A, I get a solution
> whenever I change each field.
> Is it possible to change all my five fields first and the let interact
> to compute the answer? In other words, interact should not do
> anything, unless asked explicitly.
>
> I was thinking about adding a checkbox and perform the computation
> only if the checkbox is on, but this gives another problem: how to
> uncheck the checkbox from Sage interact after computation is done.
>
> I am thinking about an interact which allows some comfortable
> manipulations with matrix rows and can be used for row pivoting,
> evaluating inverse functions, solving systems of linear equations and
> evaluating rank and determinants. For example, can be used on
> recitations. If something like this has been done, let me know,
> please. Many thanks
>
> Robert Marik
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<sage-support%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to