File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -57,23 +57,11 @@ function A_b(eqs, vars)
57
57
A, b
58
58
end
59
59
60
- macro pa (x)
61
- n = string (x)
62
- quote
63
- println ($ n, " = " )
64
- Base. print_array (stdout , $ (esc (x)))
65
- println ()
66
- end
67
- end
68
60
function solve_for (eqs, vars)
69
- @pa eqs
70
- @pa vars
71
61
72
62
A, b = A_b (eqs, vars)
73
63
A = SymbolicUtils. simplify .(to_symbolic .(A), polynorm= true )
74
64
b = SymbolicUtils. simplify .(to_symbolic .(b), polynorm= true )
75
- @pa A
76
- @pa b
77
65
map (to_mtk, SymbolicUtils. simplify .(ldiv (sym_lu (A), b)))
78
66
end
79
67
Original file line number Diff line number Diff line change @@ -134,4 +134,15 @@ function substituter(pairs)
134
134
expr -> to_mtk (SymbolicUtils. substitute (expr, dict))
135
135
end
136
136
137
+ macro showarr (x)
138
+ n = string (x)
139
+ quote
140
+ y = $ (esc (x))
141
+ println ($ n, " = " , summary (y))
142
+ Base. print_array (stdout , y)
143
+ println ()
144
+ y
145
+ end
146
+ end
147
+
137
148
@deprecate substitute_expr! (expr,s) substitute (expr,s)
You can’t perform that action at this time.
0 commit comments