Please help

19 views
Skip to first unread message

Thodosss s

unread,
Aug 30, 2019, 8:34:27 AM8/30/19
to mathics-devel
I have made a class that computes Dixon Elimination but something Null is printed , do you see the error ?

class DixonSub(Builtin):
     
    
    rules = {
        'DixonSub[expr_List,var_List,avar_List]': 'Block[{i,temp={expr}}, '
        'For[i=1,i<=Length[var],i++,AppendTo[temp,ReplaceAll[Last[temp],var[[i]]->avar[[i]]]]] '
        'If[Length[expr]===Length[var]+1 && Length[var]===Length[avar],MatrixForm[temp],"Error with the length of variables or auxiliary variables or polynomials"]]',
        
        'DixonSub[expr_List,var_List]': '"3 arguments are expected"',
        
        'DixonSub[expr_List]': '"3 arguments are expected"',
        
    }



and this is the output is the following

In[1]:= DixonSub[{x-1,x-2},{x},{a}]
Out[1]= Null -1 + x   -2 + x
        
        -1 + a   -2 + a





Reply all
Reply to author
Forward
0 new messages