maple2015

120 Reputation

6 Badges

4 years, 306 days

MaplePrimes Activity


These are replies submitted by maple2015

@Mac Dude thank you

@Markiyan Hirnyk 

Thank you for your comment

@Kitonum 

Therefore it is a bug! Like this:

http://www.mapleprimes.com/questions/204669-How-Does-Maple-Calculate-Floor-Limit

@Kitonum 

Thank you for your comment

I mean domain of the functions f=sqrt(x+2*sqrt(x-1)) and g=sqrt(x-2*sqrt(x-1)) is x>=1, but why domain of function f+g is from -infinity to infinity?

@tomles

new code runs in t=34.328 seconds (Maple18 + RAM 6GB + Core i5 Laptop)

by changing numerical parameters (without restart) because of cache memory it works in t=17.687 seconds.

Separating to smaller parts is an effective method!

Thank you

 

@tomleslie 

In which J is BesselJ(0,x) and Psi(r) is dimensionless function of w(r) (i.e. W(r)/Wmax)

"P" for psi has the minimum amount (B.C.s are Psi(0)=1 and Psi(a)=0)

arbitrary amount of between 0 and 0.5

Thank you for your comments

I need minimize an Integration and I use " Spectral Method" title for my question to clearly show what I need to do.

I use Vriational Calculus and solve Integration analytically by using Euler-Lagrange equation command:

EulerLagrange(f, t, x(t))

But I know want to solve problem numerically with Spectral Method

@Preben Alsholm 

Thank you

@acer  Thank you

@acer 

Hi

I dont know why Plotsetup don work. (with or without print)

If it is possible please fix it

restart: with(Maplets[Elements]): maplet := Maplet([[Label("Number of Elements: ", 'font' = Font("Calibri", 14)), TextField['Box1'](15), Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: if is((parse(a))::integer) then NE := sscanf(a, "%d")[1] else maplet := Maplet([[Label("Number of Elements Is An Integer Number: ", 'font' = Font("Calibri", 14))], [TextField['Box1'](20)], [Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: NE := sscanf(a, "%d")[1] end if: maplet := Maplet([[Label("Number of Nodes: ", 'font' = Font("Calibri", 14)), TextField['Box1'](15, value = cat("e.g.", NE+1)), Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: if is((parse(a))::integer) then NN := sscanf(a, "%d")[1] else maplet := Maplet([[Label("Number of Nodes Is An Integer Number: ", 'font' = Font("Calibri", 14))], [TextField['Box1'](20)], [Button("OK", Shutdown(['Box1']))]]): a := Maplets[Display](maplet)[1]: NN := sscanf(a, "%d")[1] end if: for i to NN do maplet := Maplet([[Label(cat("X Coordinate of Node ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: X[i] := sscanf(a, "%f")[1]: maplet := Maplet([[Label(cat("Y Coordinate of Node ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: Y[i] := sscanf(a, "%f")[1] end do: for i to NE do maplet := Maplet([[Label(cat("Node Number for Begining of Element ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: B[i] := trunc(sscanf(a, "%f")[1]): maplet := Maplet([[Label(cat("Node Number for End of Element ", i), 'font' = Font("Calibri", 14))], [TextField['B1'](20)], [Button("OK", Shutdown(['B1']))]]): a := Maplets[Display](maplet)[1]: EN[i] := trunc(sscanf(a, "%f")[1]) end do: with(plottools): with(plots): bg := seq({line([X[B[i]], Y[B[i]]], [X[EN[i]], Y[EN[i]]]), plots:-textplot({[.5*(X[B[i]]+X[EN[i]]), .5*(Y[B[i]]+Y[EN[i]]), typeset(i)]}, color = orange, `if`(Y[B[i]] = Y[EN[i]], align = below, align = left))}, i = 1 .. NE), seq({POINTS([X[i], Y[i]], SYMBOL(BOX, 15, ALIGN = LEFT))}, i = 1 .. NN), axes = none: NCP := display(bg, seq({plots:-textplot({[X[B[i]], Y[B[i]], typeset(``(X[B[i]], Y[B[i]]))], [X[EN[i]], Y[EN[i]], typeset(``(X[EN[i]], Y[EN[i]]))]}, color = blue, align = left)}, i = 1 .. NE)): NNP := display(seq({plots:-textplot({[X[i], Y[i], typeset(i)]}, color = blue, align = left)}, i = 1 .. NN), bg, axes = none): plt := proc () plotsetup(bmp, plotoutput = `Nodes And Elements (Nodes Coordinates).bmp`, plotoptions = `height=400,width=400`): print(NCP): plotsetup(bmp, plotoutput = `Nodes And Elements (Nodes Numbers).bmp`, plotoptions = `height=400,width=400`): print(NNP) end proc: a := Maplets[Display](Maplet([[Label("Nodes and Elements Arrangement", font = Font(14, Tahoma))], [Plotter['PL']()], [Button("Node Coordinates", Evaluate('PL' = 'NCP')), Button("Node Numbers", Evaluate('PL' = 'NNP')), Button("Save Images", Evaluate('function' = "plt")), Button("Exit", Shutdown(""))]]))

@acer 

Thank you for your help

print shows plot structure as an embedded image in maple file

But I want to save a lot of plots as images in a folder

I want do that only by using run and whitout using right-click for each plot

@cskoog 

Thank you for your explains

 

@maple2015 

thank you for your help

I dont know why CAT shows j instead of amount of j

Is there another command that shows amounts of j?

with(plottools): with(plots):

display(seq({line([X[B[i]], Y[B[i]]], [X[EN[i]], Y[EN[i]]]), plots:-textplot({[X[B[i]], Y[B[i]], typeset(``(X[B[i]], Y[B[i]]))], [X[EN[i]], Y[EN[i]], typeset(``(X[EN[i]], Y[EN[i]]))]}, color = blue, align = left)}, i = 1 .. NE), seq(TEXT([.5*(X[B[j]]+X[EN[j]]), .5*(Y[B[j]]+Y[EN[j]])], 'cat("Element ", j)', ALIGNBELOW, ALIGNRIGHT), j = 1 .. NE), axes = none))

1 2 3 4 5 6 Page 5 of 6