rexpan

55 Reputation

5 Badges

11 years, 274 days

MaplePrimes Activity


These are questions asked by rexpan

Cause CodeTools:-Test will not eval the paramater:

```
f := x -> x+1;

y := 2;

CodeTools:-Test( f(1), 2); # this will work as normal

CodeTools:-Test( f(1), y); # this will not work because `y` will not eval as 2

```

So current my solution is

```
test := subs(y=2, () -> CodeTools:-Test( f(1), y));

test();

```

 

I don't know is there any more proper solution for this.

More general, is there a way to force evaluate an `uneval` parameter?

 

I have to calculate the data in JSON format and export the result back to JSON.

It would be greate if there is any JSON package for Maple.
---

Also, I use`ExportMatrix` to export the result to CSV format.

But there are some comma (`,`) in the result content and `ExportMatrix` does not handle it well.
Is there any solution for export data to CSV file in my situation?

Thanks.

 

I have a very simply equations 

eqs := {2.32 = a+b, pa = .4310344828*a, pb = .4310344828*b, pa+pb = 1}

pa is the persnet of a in the whole a+b

maple auto simplify pa = a / 2.32 to that.

 

I call the solve(eqs) and get the NULL return. that mean there is no solution for this eqs

but that's not true

even I do this

solve(eqs union {a=1})

it also return NULL

I have a system equations like { a + b = 1, c = a + b +1, d = a + c}

and the sovle function which give me then answer like { a = -2+d, b = -d+3, c = 2, d = d}

I just care about the information in form (name = numeric) like { c = 2 }

and i want the "core" equations which give me that information like { a +b = 1, c = a +b +1 } => {c = 2}

how i can i get the "core" equations of that.

I like the pretty print of maple, and I want to print the output to a file instead Maple document (if it could be, print in both of 2).

For example:

exprs := [ (a*x + b)/sin(x) = 0, (a*x^2 + b*x + c)/(d*x + e) = 0 ]:
print~(exprs);

And my output text file may be somthing like this:
                          a x + b    

1 2 Page 1 of 2