## 155 Reputation

19 years, 90 days

## inequations: how to find a partical nume...

Maple

Having solution of an inequations system, is there a way/function/algorithm to find a particular numeric solution (as simplex[minimize] can do) ?

ex:

Q := {1 < x - y, x + y < 1};

R := solve(Q);

{ x < 1 - y, y < 0, y + 1 < x }

manually it's easy to find some numeric solutions:

y = -1, x = 1
y = -2, x = 0

but I need an automatic way.

s.py

## problem with keyword parameters and recu...

Maple
```test := proc(x::integer, {y::posint:=1}, {z::posint:=1}, \$)
printf("%a\n", 'procname'(args));
if x > 100 then
procname(x-y-z-1, 'y'=10);     # not working (nor ''y'', uneval(y), evaln(y) etc.)
elif x < 100 then
procname(x-1, args[2..nargs]); # working
else
NULL;
fi;
end:
test(1000);
Error, (in test) invalid input: too many and/or wrong type of arguments passed to test; first unused argument is 1 = 1
```

## uneval parameters...

Maple

hi.

when i want to modify a parameter it's easy:

test1 := proc(x::uneval)
x:=eval(x)+1;
NULL;
end proc;

x:=5;
test1(x);
x;

ok x is now 6

How to do that with lists of names ?
ie writing a procedure test2 so that I can do that:

x:=10;
y:=20;
test2([x,y]);
x,y;
11,21

thank you

## user simplify...

Maple

I have created a user simplify procedure

`simplify\mysimplify` := proc(fun) ... etc ...

It works correctly, but not when i add it in a module.
ie a call as :

with(MyModule); simplify(x^2+x,mysimplify)

dont call mysimplify.
But it works if I call it directly

with(MyModule);
`simplify\mysimplify`(x^2+x);

I think I miss something but i can't point the error. What is the correct declaration ?
(the module is correct, others procedure works fine)

## realtime print...

Maple

The problem:
I'm doing some calcs long to compute (some days). With Maple 12 the print command shows nothing, it seems executed when returning from the procedures.

The question:
How can I print intermediates results/progress in a procedure so they appears immediatly ?

Thanks

 1 2 Page 1 of 2
﻿