maple2015

140 Reputation

7 Badges

9 years, 268 days

MaplePrimes Activity


These are replies submitted by maple2015

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

@Markiyan Hirnyk 

I forget to re-assign result into U

@Carl Love 

Thanks

@Markiyan Hirnyk 

Thanks for your help

This command dont display u(t) but in calculations u(t) is considered

@acer 

I find  ' Import() '  command

 

 

@acer 

Thanks for your more compact form of sequence command.

@tomleslie 

Thank you

@Carl Love 

Everything about text options is in here

Thank you

@Carl Love 

Thank you for your hint

Is in Maple something like to screenTip (similar to HTML codes)?

 

1 2 3 4 5 6 Page 6 of 6