MaplePrimes - Maple 2017 Posts and Questions
http://www.mapleprimes.com/products/Maple/Maple 2017
en-us2020 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemMon, 25 May 2020 06:06:59 GMTMon, 25 May 2020 06:06:59 GMTMaple 2017 Questions and Posts on MaplePrimeshttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Maple 2017 Posts and Questions
http://www.mapleprimes.com/products/Maple/Maple 2017
Maple 2017.3 problems with complex numbers, solve, and aliases
https://www.mapleprimes.com/questions/229605-Maple-20173-Problems-With-Complex-Numbers?ref=Feed:MaplePrimes:Version Maple 2017
<p>Hi,<br>
<br>
Maple 2017.3 has these problems which hamper my work with it. I shown three examples.<br>
<br>
Example 1: Maple cannot recognize automatically that two complex numbers are equal:<br>
<br>
[>eq1:=9*exp((1/9)*(5*I)*Pi)-9*exp((1/9)*(2*I)*Pi) = -8*exp((1/9)*(2*I)*Pi)+7*exp((1/9)*(5*I)*Pi)+exp((1/18)*(13*I)*Pi)*sqrt(3);<br>
<br>
Here, lhs(eq1) and rhs(eq1) are in fact equal. Yes, evela(simplify(lhs(eq1)-rhs(eq1)) reduces to zero but not when solving equations (see Example 2).<br>
<br>
Example 2:<br>
<br>
[>sys1:=[_xx[1]+lhs(eq1),_xx[1]+rhs(eq1)];<br>
[>solve(sys1,[_xx[1],_xx[2]]);<br>
<br>
yields no answer.<br>
<br>
Example 3:<br>
<br>
[>alias(omega=RootOf(_Z^2+_Z+1));<br>
[>rt:=(-1+I*sqrt(3))/2;<br>
<br>
Maple fails to substitute the alias and recognize that rt=omega.<br>
<br>
Any suggestion on a work-around problems 2 and 3 would be helpful.<br>
<br>
Thanks,<br>
<br>
Rafal Ablamowicz<br>
www.math.tntech.edu/rafal/<br>
<br>
<br>
</p>
<p>Hi,<br />
<br />
Maple 2017.3 has these problems which hamper my work with it. I shown three examples.<br />
<br />
Example 1: Maple cannot recognize automatically that two complex numbers are equal:<br />
<br />
[>eq1:=9*exp((1/9)*(5*I)*Pi)-9*exp((1/9)*(2*I)*Pi) = -8*exp((1/9)*(2*I)*Pi)+7*exp((1/9)*(5*I)*Pi)+exp((1/18)*(13*I)*Pi)*sqrt(3);<br />
<br />
Here, lhs(eq1) and rhs(eq1) are in fact equal. Yes, evela(simplify(lhs(eq1)-rhs(eq1)) reduces to zero but not when solving equations (see Example 2).<br />
<br />
Example 2:<br />
<br />
[>sys1:=[_xx[1]+lhs(eq1),_xx[1]+rhs(eq1)];<br />
[>solve(sys1,[_xx[1],_xx[2]]);<br />
<br />
yields no answer.<br />
<br />
Example 3:<br />
<br />
[>alias(omega=RootOf(_Z^2+_Z+1));<br />
[>rt:=(-1+I*sqrt(3))/2;<br />
<br />
Maple fails to substitute the alias and recognize that rt=omega.<br />
<br />
Any suggestion on a work-around problems 2 and 3 would be helpful.<br />
<br />
Thanks,<br />
<br />
Rafal Ablamowicz<br />
www.math.tntech.edu/rafal/<br />
<br />
<br />
</p>
229605Wed, 20 May 2020 13:33:29 ZRafalAblamowiczRafalAblamowiczWhich 3D plot I should use if I want to plot a surface from 3 vectors of points?
https://www.mapleprimes.com/questions/229500-Which-3D-Plot-I-Should-Use-If-I-Want?ref=Feed:MaplePrimes:Version Maple 2017
<p>Hi everyone, I hope you are staying safe from coronavirus.<br>
<br>
I have a table of data points in excel (attached file) and want to plot a smooth surface plot in Maple, the plot will look like in the image below. How can I do it in Maple (2017)? I tried matrixplot(matrix) and the surface is good. However, I couldn't change the X, Y axes value since it should be the default value. <br>
<br>
Thank you very much.<img src="/view.aspx?sf=229500_question/Excel.png"><a href="/view.aspx?sf=229500_question/PlotTest.xlsx">PlotTest.xlsx</a></p>
<p>Hi everyone, I hope you are staying safe from coronavirus.<br>
<br>
I have a table of data points in excel (attached file) and want to plot a smooth surface plot in Maple, the plot will look like in the image below. How can I do it in Maple (2017)? I tried matrixplot(matrix) and the surface is good. However, I couldn't change the X, Y axes value since it should be the default value. <br>
<br>
Thank you very much.<img src="/view.aspx?sf=229500_question/Excel.png"><a href="/view.aspx?sf=229500_question/PlotTest.xlsx">PlotTest.xlsx</a></p>
229500Tue, 05 May 2020 17:04:05 ZHuanLuongHuanLuongProblem with fsolve and point plot, not getting desired solution.
https://www.mapleprimes.com/questions/229496-Problem-With-Fsolve-And-Point-Plot?ref=Feed:MaplePrimes:Version Maple 2017
<p>Hello everyone, </p>
<p>I have a parametric plot which you can see in the first image below, g and t are both functions of (p,v). I have fixed the value of p in the functions then plotted for v, and you can see the resulting plot (i am only interested in the blue figure) there is an intersection. </p>
<p>The maximum value p is aloud to have in my functions 1/(12*pi) which i am approximating to 0.026. So what i am trying to do is for p from 0.026 to 0 obtain values of t for each p then plot then with pointplot with arrays i have made after solving the equations. However the plot which i am obtaining is not matching what i want see second image below. </p>
<p> </p>
<p>I have attached my code so you can see what i have done and how my image doesnt match any help would be appreciate, Thanks.<img src="/view.aspx?sf=229496_question/ImageOne.png"><img src="/view.aspx?sf=229496_question/ImageTwo.png"><a href="/view.aspx?sf=229496_question/Solving_Equation_.mw">Solving_Equation_.mw</a></p>
<p>Hello everyone, </p>
<p>I have a parametric plot which you can see in the first image below, g and t are both functions of (p,v). I have fixed the value of p in the functions then plotted for v, and you can see the resulting plot (i am only interested in the blue figure) there is an intersection. </p>
<p>The maximum value p is aloud to have in my functions 1/(12*pi) which i am approximating to 0.026. So what i am trying to do is for p from 0.026 to 0 obtain values of t for each p then plot then with pointplot with arrays i have made after solving the equations. However the plot which i am obtaining is not matching what i want see second image below. </p>
<p> </p>
<p>I have attached my code so you can see what i have done and how my image doesnt match any help would be appreciate, Thanks.<img src="/view.aspx?sf=229496_question/ImageOne.png"><img src="/view.aspx?sf=229496_question/ImageTwo.png"><a href="/view.aspx?sf=229496_question/Solving_Equation_.mw">Solving_Equation_.mw</a></p>
229496Tue, 05 May 2020 02:41:28 ZHullzie16Hullzie16How to search and remove elements in a list of variable size?
https://www.mapleprimes.com/questions/229423-How-To-Search-And-Remove-Elements-In?ref=Feed:MaplePrimes:Version Maple 2017
<p>Hello</p>
<p>Unfortunately I run out of ideas on how to solve the problem of searching and removing elements in a variable size list. Below you can find an example.</p>
<pre class="prettyprint">
parms:=[seq(seq(alpha[i,j],j=0..9),i=1..3)];
abc:=combinat:-choose(parms,3):</pre>
<p>the condition to remove the element of the list is given by the following procedure.</p>
<pre class="prettyprint">
conds:= proc(varCoef::list,vars::name:=alpha)
local T1,T2,res;
#
T1 := table([2=3,3=2,5=6,6=5,7=9,9=7]):
T2 := table([2=3,3=2]):
#
res:=map(u->vars[`if`(assigned(T2[op(1,u)]),T2[op(1,u)],op(1,u)),
`if`(assigned(T1[op(2,u)]),T1[op(2,u)],op(2,u))],
varCoef);
res:=convert(convert(res,set),list):
end proc:</pre>
<p>Something like</p>
<pre class="prettyprint">
member(conds(abc[1]),abc,'k')</pre>
<p>if it is a member, the element indexed by k should be removed from abc and then the search continues using the next element in abc (that now has one less element). Otherwise, the element is kept and the search moves to next one. The process ends when the last element in a short version of abc is tested.</p>
<p>Thanks all for the help and patience.</p>
<p> </p>
<p>Ed</p>
<p> </p>
<p> </p>
<p>Hello</p>
<p>Unfortunately I run out of ideas on how to solve the problem of searching and removing elements in a variable size list. Below you can find an example.</p>
<pre class="prettyprint">
parms:=[seq(seq(alpha[i,j],j=0..9),i=1..3)];
abc:=combinat:-choose(parms,3):</pre>
<p>the condition to remove the element of the list is given by the following procedure.</p>
<pre class="prettyprint">
conds:= proc(varCoef::list,vars::name:=alpha)
local T1,T2,res;
#
T1 := table([2=3,3=2,5=6,6=5,7=9,9=7]):
T2 := table([2=3,3=2]):
#
res:=map(u->vars[`if`(assigned(T2[op(1,u)]),T2[op(1,u)],op(1,u)),
`if`(assigned(T1[op(2,u)]),T1[op(2,u)],op(2,u))],
varCoef);
res:=convert(convert(res,set),list):
end proc:</pre>
<p>Something like</p>
<pre class="prettyprint">
member(conds(abc[1]),abc,'k')</pre>
<p>if it is a member, the element indexed by k should be removed from abc and then the search continues using the next element in abc (that now has one less element). Otherwise, the element is kept and the search moves to next one. The process ends when the last element in a short version of abc is tested.</p>
<p>Thanks all for the help and patience.</p>
<p> </p>
<p>Ed</p>
<p> </p>
<p> </p>
229423Sun, 26 Apr 2020 02:33:12 Zemendesemendescombinat:-subset with a chosen number of elements? An alternative?
https://www.mapleprimes.com/questions/229404-Combinatsubset-With-A-Chosen-Number?ref=Feed:MaplePrimes:Version Maple 2017
<p>Hello</p>
<p>I need to test a huge amount of subsets and for doing that I was thinking of using combinat:-subset, since it avoids allocating memory for all subsets. The problem with subset for my specific application is that it generates sets with all possible sizes and I just need subsets with a chosen number of elements. Can that be done in maple? </p>
<p>Many thanks</p>
<p>Ed</p>
<p> </p>
<p>Hello</p>
<p>I need to test a huge amount of subsets and for doing that I was thinking of using combinat:-subset, since it avoids allocating memory for all subsets. The problem with subset for my specific application is that it generates sets with all possible sizes and I just need subsets with a chosen number of elements. Can that be done in maple? </p>
<p>Many thanks</p>
<p>Ed</p>
<p> </p>
229404Fri, 24 Apr 2020 15:50:30 ZemendesemendesHow to translate "blank pattern" to maple?
https://www.mapleprimes.com/questions/229386-How-To-Translate-blank-Pattern-To-Maple--?ref=Feed:MaplePrimes:Version Maple 2017
<p>Hello</p>
<p>Moving from Mathematica to Maple and back these couple of days is driving me insane. I get stuck trying to translate very simple things for not knowing each command belongs to each software. Therefore I do apologize for another silly question. </p>
<p>Given the list of indexed variables</p>
<pre class="prettyprint">
varA := [A[1, 0], A[1, 1], A[1, 2], A[1, 3], A[1, 4], A[1, 5], A[1, 6], A[1, 7], A[1, 8], A[1, 9], A[2, 0], A[2, 1], A[2, 2], A[2, 3], A[2, 4], A[2, 5], A[2, 6], A[2, 7], A[2, 8], A[2, 9], A[3, 0], A[3, 1], A[3, 2], A[3, 3], A[3, 4], A[3, 5], A[3, 6], A[3, 7], A[3, 8], A[3, 9]]</pre>
<p>how to apply the following substitution </p>
<pre class="prettyprint">
varA/. {Subscript[A, m_, 2] -> Subscript[B, m, 3],
Subscript[A, m_, 3] -> Subscript[B, m, 2],
Subscript[A, m_, 5] -> Subscript[B, m, 6],
Subscript[A, m_, 6] -> Subscript[B, m, 5],
Subscript[A, m_, 7] -> Subscript[B, m, 9],
Subscript[A, m_, 9] -> Subscript[B, m, 7]}</pre>
<p>After trying a couple of commands such as map, subs, etc. I decide to try fromMma but no avail. </p>
<p>Many thanks for the patience and help.</p>
<p> </p>
<p>Ed</p>
<p> </p>
<p> </p>
<p>Hello</p>
<p>Moving from Mathematica to Maple and back these couple of days is driving me insane. I get stuck trying to translate very simple things for not knowing each command belongs to each software. Therefore I do apologize for another silly question. </p>
<p>Given the list of indexed variables</p>
<pre class="prettyprint">
varA := [A[1, 0], A[1, 1], A[1, 2], A[1, 3], A[1, 4], A[1, 5], A[1, 6], A[1, 7], A[1, 8], A[1, 9], A[2, 0], A[2, 1], A[2, 2], A[2, 3], A[2, 4], A[2, 5], A[2, 6], A[2, 7], A[2, 8], A[2, 9], A[3, 0], A[3, 1], A[3, 2], A[3, 3], A[3, 4], A[3, 5], A[3, 6], A[3, 7], A[3, 8], A[3, 9]]</pre>
<p>how to apply the following substitution </p>
<pre class="prettyprint">
varA/. {Subscript[A, m_, 2] -> Subscript[B, m, 3],
Subscript[A, m_, 3] -> Subscript[B, m, 2],
Subscript[A, m_, 5] -> Subscript[B, m, 6],
Subscript[A, m_, 6] -> Subscript[B, m, 5],
Subscript[A, m_, 7] -> Subscript[B, m, 9],
Subscript[A, m_, 9] -> Subscript[B, m, 7]}</pre>
<p>After trying a couple of commands such as map, subs, etc. I decide to try fromMma but no avail. </p>
<p>Many thanks for the patience and help.</p>
<p> </p>
<p>Ed</p>
<p> </p>
<p> </p>
229386Tue, 21 Apr 2020 14:24:17 Zemendesemendes