Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

Hello everyone,

I am trying to represent a set of data using the errorplot command as follows

plotlims50 := ErrorPlot(xcoords = vectorl, sigmasl50, yerrors = [0.1e-1, 0.4e-1, 0.1e-1, 0.3e-1, 0.3e-1, 0.6e-1, 0.6e-1, 0.1e-1, 0.4e-1, 0.6e-1, 0.5e-1, 0.3e-1, 0.2e-1, 0.2e-1], color = "green")

I guess it's okey, but I would like to have that kind of small lines at the end of the bar and perpendicular to it (like in the image below). Is it possible?

Thank you so much in advance

Hi,

I'm working on a procedure involving conic equations such as follows... 

Conic:=a*x^2+2*h*x*y+b*y^2+2*f*x+2*g*y+c;

and I have a file filled with values in order of the variables I want them assigned to.

e.g 2,-6,3,0,0

I'm only looking for the specific command I need for maple to link the two.

Any help would be greatly apreciated.

Hello everyone,


I'm trying to generate plots in Maple so that I can export the image and be easily read in a document. I usually use the plots [display] command as I often reuse "subplots". The main problem appears when entering a legend, as it disrupts the proportions and I have to rescale everything manually. In doing so I sometimes get small, hard-to-read images or captions. Is there any way to resize the image and caption other than manually? Even better, is there a way to scale both to a certain image size and to make the caption legible at that size (e.g. image 7 cm wide and font equivalent to 10 pt in Word)?

Thank you so much in advance

Hi, I'm having trouble setting up a procedure for an assignment, we're trying to find root mean square error and remove variable by variable to find the best line of fit etc etc... hopefully from the coding you can see what I'm am trying to do, but I don't understand why it is not working? I wonder if it has something to do with the X and Y being read in?
 
M:=readdata("C:\\Users\\bjense04.CSUMAIN.001\\Documents\\ass1Q2.txt",[float,float,float,float,float]):
convert(M,matrix):
with(LinearAlgebra):
n:=RowDimension(convert(M,matrix));
X:=convert(M[1..n,1..4],matrix):
Y:=convert(M[1..n,5..5],vector):
with(Statistics):
FullEQN:=LinearFit([1,a,b,c,d],X,Y,[a,b,c,d]);
#the next part is incomplete
rmse_mlr:=proc(Full)
local i, sq, n, predicted;
sq:=0:
for i from 1 to n do
 predicted:=subs([a=X[i,1],b=X[i,2],c=X[i,3],d=X[i,4]],Full);
 sq:=sq+(Y[i]-predicted)^2;
end do:
return sqrt(sq/n);
end proc;
 
 
I then test the procedure with 
rmse_mlr(FullEQN,X,Y);
 
and the response i get is

Error, (in rmse_mlr) final value in for loop must be numeric or character
 
help?

I can't figure out how to write a program to work out the classification of a conic and if it is a degenerate given a data file.

So far I have programed the following which reads the conic coefficients (a,h,b,f,g,c) and displays it as an equation: 

conic :=proc(a,h,b,f,g,c)
local C;
C:= a*x^2+h*x*y+b*y^2+f*x+g*y+c=0;
end proc:

Can anyone help me work this out

Hi I have product of function Q along with its derivative.  

Q'j(x)*Qi(x) for j=0,1 and i=0,...n.

how can i make loop  to collect all coefficeints for this function for j=0,1 and i=0,1,..n.

i hope some one will help me.

Thanks

Hi Everyone, So i have a pretty ugly function which i am interesting in plotting. When i plot it seems that all values are real however when i do evalf with specific values of variable i am plotting over it shows that it is complex. Any thoughts on how to get it to stop plotting once it becomes complex? See attached maple file.

ComplexPlotQuestion.mw

Thanks. 

I am trying to count of the number of primes p such that when p is concatenated with 1 (ie p1, or 10*p+1),  if p1 is composite then we record the result 1, else  2. This gives the minimum k for which the concatenation pk is composite, and k is always either 1 or 2. It would be interesting to compare the number of primes with 1 and those with 2 up to a given max. I have already written a code which calculates the 1 or 2 for each prime but have not managed to adapt it keep count.
 

I would like to have a code to keep a count  of the 1s and 2s, thus being able to say that up to 10^k we see {a, b} where a is the number of primes with "1" and b is the number with "2".

Ideally I would like to be able to output plots of these data for any k =1,2,3,... up to a pre declared maximum k value, so as to make comparative graphs. I do not know how to organise the counting process, or if it is possible to get Maple to do the plots as well. Can anyone please assist me with this? I have Maple 2017.

Best regards,

David.

 

Hi,

Maple 2017.3 has these problems which hamper my work with it. I shown three examples.

Example 1: Maple cannot recognize automatically that two complex numbers are equal:

[>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);

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).

Example 2:

[>sys1:=[_xx[1]+lhs(eq1),_xx[1]+rhs(eq1)];
[>solve(sys1,[_xx[1],_xx[2]]);

yields no answer.

Example 3:

[>alias(omega=RootOf(_Z^2+_Z+1));
[>rt:=(-1+I*sqrt(3))/2;

Maple fails to substitute the alias and recognize that rt=omega.

Any suggestion on a work-around problems 2 and 3 would be helpful.

Thanks,

Rafal Ablamowicz
www.math.tntech.edu/rafal/


 

Hi everyone, I hope you are staying safe from coronavirus.

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. 

Thank you very much.PlotTest.xlsx

Hello everyone, 

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. 

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. 

 

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.Solving_Equation_.mw

Hello

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.

parms:=[seq(seq(alpha[i,j],j=0..9),i=1..3)];
abc:=combinat:-choose(parms,3):

the condition to remove the element of the list is given by the following procedure.

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:

Something like

member(conds(abc[1]),abc,'k')

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.

Thanks all for the help and patience.

 

Ed

 

 

Hello

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?  

Many thanks

Ed

 

Hello

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. 

Given the list of indexed variables

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]]

how to apply the following substitution 

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]}

After trying a couple of commands such as map, subs, etc. I decide to try fromMma but no avail.  

Many thanks for the patience and help.

 

Ed

 

 

Hello every one:

I am trying to plat the graph of a function (which has been defined in my code). I use the plat 3D operator but it doesn't give me the correct plot . I even increase the digites and numpoints but appearently it gave me less precise plot . 

The problem of plots is as follows :

First I defined the function V and  asking maple to compute the values of V at some random points, spacially at (0,0) , (0,2*Pi) and (2*Pi,0) . It gave me 0 which means Maple computes the values correctly because it can be mathematically proved  that this function has the value 0 on all the board of a triangle with vertices (0,0) , (0,2*Pi) and (2*Pi,0) . 

As you can see in my code maple doesn't show the correct value (0)  for the boundary points even at (0,0) ! 

 

I don't know how shoud I fix this problem.You can find my code in attached .Thanks in advanced for your help. Maple_question.mw 

1 2 3 4 5 6 7 Last Page 1 of 37