40 Reputation

5 Badges

7 years, 33 days

MaplePrimes Activity

These are questions asked by PunkRediska

Can i make Explore with number of parameters differs from parameter in explore?
For excemple i whant to make sum with 'l' values wich will declorate in explore, and 'l' - count of them will declorate in same explore, but it dont work, so is it posible?




Explore(add(cat('c', eval('i')), i = 1 .. l), parameters = [l = [seq(i, i = 1 .. 5)], seq(cat('c', eval('i')) = 0 .. 1.0, i = 1 .. l)])

Error, unable to execute seq



ec := proc (l) global f, p; f := add(cat('c', eval('i')), i = 1 .. l); print(f); p := [seq(cat('c', eval('i')) = 0 .. 1.0, i = 1 .. l)]; Explore(f, parameters = p) end proc;

proc (l) global f, p; f := add(cat('c', eval('i')), i = 1 .. l); print(f); p := [seq(cat('c', eval('i')) = 0 .. 1.0, i = 1 .. l)]; Explore(f, parameters = p) end proc






Explore(ec(l), l = [seq(i, i = 1 .. 5)])






Download Explore_Problem_Exemple.mw


I cant understend how to use new Maple workbook, and i cant load it on a site so i will use screenshoots to explain. I whant to add my costume functions to code attachments and exceuted them in multitipe workshellds, but i dont know how to excecude them from ther + i cant understend how varibles sistem work. For excemple i go main document ex1, in it i save z as global varible for all worksheed, when i excecute it works alright in other workdoxument c2 but when i change it in main document it didnt change in others, but in saved varibles in ex1 saved new value of z , and in all others z is left same as it was. In such whay i can save function f2 wich is declorated in workdocument c2 as varible, it will exceute in main ex1 but any changes of f2 in c2 wudent be applied in ex2, if i declorated and excecude f1 in c1 code attachment it dont even generate in varibles tables + i dont see any whay to excecute it from ex1, so here the qestion how to excecute functions saved in code attachments in other book's wordsheets and how make saved varibles usable in all book?

I need to create n-order tensor filled with any symbolic variable, for exemple 'x', but "symbol" option works only on vectors and matrix, so i don't know how to do that on n-order array.

X := Vector(3, symbol = x);#------ Work
Matrix(3, 3, symbol = x);#------ Work

Array(1 .. 3, 1 .. 3, 1 .. 3, symbol = x);
Error, argument `symbol = x` is incorrect or out of order

And 2nd problem thet globaly i need to create symmetric n-order tensor with symmitry for any pair of index and with contraction for any couple of indexes equal to zero. As i understend i need to create a big list of equations for every individual pair of index and 2 conditions (contraction and symmitry) and solve it to get a match and combination of independent index and paste values in them?


Hi, i got a litlle problem with fromats, i m realy bad at this.
i got procedure 'getone(z::list)' i was execute it like this  
>getone([seq(lineP[i], i = 1 .. pm)]::list)
where lineP is 

>pm := 3;
>rollx := rand(98.0 .. 102.0); rolly := rand(-1.0 .. 5);
>rolll := rand(.5 .. 1.0); rollf := rand(0. .. evalf(2*Pi));
>rollm := rand(0. .. 20.0);

>for i to pm do lineP[i] := [rollx(), rolly(), rolll(), rollf(), rollm()] end do;

it's pm times of z:=[rollx(), rolly(), rolll(), rollf(), rollm()] ::list

and i need make optimization work for any pm=1..100; with rabdomly generated iteration point as above.

The main queston is how make minimize as below
Minimize(z,variables=[z],   initialpoint={z=[seq(lineP[i], i = 1 .. pm)]},iterationlimit=1000,optimalitytolerance=0.01)

work with z::list kind of 

[[100.7798614, 1.109653266, 0.9840371500, 4.257816686, 9.737110573][100.0135459, 0.887539481, 0.9144164697, 3.980093624, 7.343851161][100.0661308, 3.724268229, 0.5020544909, 2.052134822, 14.37408543]]

So i got a procedure test, she is kind of numeric, i whant to optimaze test([.5, .5, .5], 1, 3, 100, 100, true, [x, 0, 0, 0, 0])=0 by x. But optinization substitutes x like a symbol, i tryed all methods but they all do the same.

f := proc (x) options operator, arrow; abs(test([.5, .5, .5], 1, 3, 100, 100, true, [x, 0, 0, 0, 0])-.4) end proc; Minimize(f(x));
Error, (in test) cannot determine if this expression is true or false: 0 < -43.0+100*x

Can i some how use optinization on such procedure?

file link  - >    primset.mw

1 2 3 Page 1 of 3