## problem with writing the result to a file...

i want to write the result of a calculation to a file in a way that i can be able to call them later. for example :

restart;
n := 40; h := 40;
a := h*i/(2*n);

sys1 := [diff(x(t), t) = 2*t+1, diff(y(t), t) = 1+5*t, x(0) = 1, y(1) = 0];

for i from 0 by .5 to 1 do res := dsolve(sys1, numeric); res(a) end do;

i would like to write just the values of t and y(t) to a file/vector or whatever.

## How do I access attributes and members in modules...

Hi,

I want to write my first module, and I failed!  I create an instance of the class (module?)

myList := TestModule(3);                    # works.

But I've no acess to the members, since I use export! What's wrong?

myList:-get_n;
myList:-set_n(20);
myList:-run();

Error, myList does not evaluate to a module
Error, myList does not evaluate to a module
Error, myList does not evaluate to a module

# *****************************************************************************

TestModule := module()
export get_n, set_n, run;
local  n, result, ModuleApply, profileRun;
option package;
description "A testmodule";

# Constructor
ModuleApply := proc(n)
print("Calling of Module Apply...");
thismodule:-n := n;
result := [];
profileRun();
return result;
end proc:

# Implementation of member run
run := proc()
print("Calling of run...");
dummy := [];
for i from 1 to 20000 do
dummy := [op(dummy), i]
end do;
result := TRUE;
end proc;

# Implementation of member runprofile;
profileRun := proc()
print("Call of profileRun...");
CodeTools[Profiling]:-Profile(run);
run();
CodeTools[Profiling]:-PrintProfiles(run);
CodeTools[Profiling]:-UnProfile(run);
end proc;

# getter
get_n := proc()
n;
end proc;

# setter
set_n := proc(n)
thismodule:-n := n;
end proc;

end module;

## MAPLE To MATLAB...

 >

Paramétres

 >
 (1.1)
 > beta := 30;
 (1.2)
 >
 (1.3)

 >
 >
 (1.4)
 >
 (1.5)

Résolution & plots

 >
 (2.1)
 >
 (2.2)
 >
 (2.3)
 >

ET

 >
 (3.1)
 >
 (3.2)
 >
 >
 (3.3)
 >
 (3.4)

Hi evey ones ;

how can i convert these code below TO matlab

thank a lot Maple_to_MATLAB.mw

## How do I insert Maple plots into LaTeX documents?...

How do I insert Maple18 plots into LaTeX documents?

## how i can save results in maple in text file?...

hi...

how i can save results in text file?

for example in attached code maple i want save results for different ''x'' and fy(x), wherer x is between 0 to 1 i.e. (0,fy(0)) , (0.1,fy(0.1)) ,(0.2,fy(0.2)),....

in text file two column should be create.one of them for ''x'' and the onther for ,fy(x)

thanks...

Numerical_.mw

 (1)

## Trouble by exporting 3dplot to PS...

There are 4 points which I want to plot as solid spheres in 3d. Here is the code:

Rplot := pointplot3d(<,>(r, Transpose(Vector([0, 0, 0]))), style = point, symbolsize = 40, color = [red, grey, grey, green])

plotsetup(ps, plotoutput = E:\\.../C.eps, plotoptions = width=2000, height=2000, noborder); print(plots:-display(Rplot, axes = boxed, labels = [x, y, z], symbol = solidsphere));

plotsetup(default, plotoptions = width=2000, height=2000, noborder); display(Rplot, axes = boxed, labels = [x, y, z], symbol = solidsphere)

In Maple itself everything looks fine, but once I try to export it to ".ps" I see this.

The problem lies in "symbol = solidsphere". When I change it to "diamond", for example, export is successful:

But I need solidsphere. What should I do to fix this error (except manual editing in Adobe Illustrator)?

## Convert plot into image type...

Hi, community

I want to take a series of plots and convert them into an image-type to export using the ImageTools (Write) command.

Something like this:

for i from 1 to N do

x[i]:=procedure;    <--- This procedure has a plot as output

y[i]:= ** convert x[i] into an image type ** <-- This is the part that I haven't figured out

Write( filename[i], y[i]);

end do;

I don´t know if something like this is possible. Any hints or suggestions would be appreciated.

I guess I could generate N plots and then right click the images to save them... But N is large (hundreds of images) and it is not a nice option to sit all day long saving N images one by one.

Thanks and regards...

## numerical equation using loop for...

hello evrey one ,

my question is how can i solve numerical equation using loop

for each beta => deolve and export via excel
thank you

 >
 >
 >
 (1)

 >
 (2)
 >
 (3)
 >
 (4)
 >
 >

## Attempt to create an animation zooming in on axis...

I want to apologize if this being neither necessarily a minimal working example for one question nor just one question is uncomfortable. The "MWE" was created on and is designed for Linux machines including ImageMagick. The problem itself should be obvious to all users though, as the subfolder and creation of the gif are just conveniences. I have three sections concerning the different problems occuring in my attempts.

(which I was told is not doable in maple ... hence the gif)

The goal was to create an animation that zooms in on a function. As maple just wouldn't allow scaling of axis in animations I decided to export single frames and then convert those with ImageMagick. Maple offers ssystem(„...“) which allows for command line usage.

The problem (may as well be a bug) occurs when I try to export images in a for loop with exportplot(...). If the path as well as previously exported images exist, it won't output an error but still not export the desired images. Exporting frames separately works just fine, as well as doing the very same operation in a separate for loop.

(see the first red comment and export section)

After using the workaround in a second for loop. I couldn't figure out how to import the images and then create an animation from them. The main obstacle is the fact that the imported pictures are put into plot-functions.

(see the second red comment)

 > restart;
 > with(plottools): f1 := s -> sin(2*s): max_frame := 10: # = number of steps for k from 0 to max_frame do     pic[k] := plot(f1(x), x=-Pi*(1-k/max_frame)..Pi*(1-k/max_frame),                     filled=true, #color = ["Orange"],                     color = ColorTools:-Color([0,                                               floor(128*k/max_frame),                                               floor(255*k/max_frame)                                               ]),                     view=[-Pi*(1-k/max_frame)..Pi*(1-k/max_frame), -1..1]                     ): end do: path := FileTools:-TemporaryDirectory(); path_list := ssystem("pwd"); path := path_list[2]; ssystem("mkdir ./pics"); # creates a subfolder path := FileTools:-JoinPath([path, "pics"]); # need to change path to subfolder plotsetup(window, plotoptions="width=480, height=600"); for k from 0 to max_frame do     file[k] := FileTools:-JoinPath([path,                                      MapleTA:-Builtin:-strcat("frame_",                                                               convert(k, string),                                                               ".jpg")                                     ]);     # exportplot(file[k], pic[k]); # does not work end do:
 > exportplot(file[0], pic[0]); # works
 > # ===================================================================================== # export # ===================================================================================== for k from 0 to max_frame do   exportplot(file[k], pic[k]); od; # also works
 > # ===================================================================================== # import # ===================================================================================== for k from 0 to max_frame do     reimported_pic[k] := importplot(file[k]); # this might take a while (depending on the amount of frames) end do: # import works but [Length of output exceeds limit of 1000000] whattype(reimported_pic[0]); #seems to create a plot function show := convert(reimported_pic,list): #Error, while processing result #There is no help page available for this error
 > show[1]; # works
 > # ===================================================================================== # create an animated gif at least # ===================================================================================== delay_time := ceil(evalf(100/max_frame)); command_for_gif := MapleTA:-Builtin:-strcat("convert -delay ",                                             convert(delay_time, string),                                             " -loop 0 ", # -reverse ",                                             FileTools:-JoinPath([path, "frame_*.jpg "]),                                             FileTools:-JoinPath([path, "animation.gif"])                                             ); ssystem(command_for_gif);
 >

I would be grateful for any suggestions. Moreover I have run accross

?DocumentTools:-Components:-VideoPlayer

which I could not figure out how to use by the help pages (I tried to create an avi and import that). If someone has informations on that, please share!

## How to export a worksheet (.mw) to Maple Input (.m...

I have a worksheet (.mw) file that I want to export using a statement to avoid tedious GUI clicking.

How to export a worksheet (.mw) to Maple Input (.mpl) using a statement in the worksheet, so I can just execute the worksheet, and then the Maple Input (.mpl) file is generated?

## Convert Maple online examples into raw text entry?...

Maple's online help pages render all of the inputs (and outputs) as fancy math (MathJax). I guess the assumption is that you're using the visual IDE. However, I only have access to a terminal with ASCII entry (e.g., via SSH).

How can I can convert the online help pages into something that I can enter directly via the command line?

For example, how do I convert the examples from the EulerLagrange help page into command line entry?

I'm looking for a procedural way or ideally a toggle "switch".

## exporting to latex...

I have exported a maple document to latex, but it only shows the output of the commands used. Rather than the commands, and the procedures.

How do I get both to export together? and show up together?

## latex document preparation from maple worksheets...

any assistence here will be much appreciated the website gave me a zip containing the template tex and other files, but for what ever reason its not working when i copy in output using the maple to latex conversion feature from inside the interface. literally im sick of having to work outside of the maple interface but yes believe it or not this is the one thing i use to procrastinate writting a formal publication yep i really need the first one of those to get this done and dusted.

## How do I find and access a temporary .stl file tha...

I read a posting by Mr. Stephen Forrest on Thingiverse about using the exportplot command to export a 3D plot as a .stl file. I have a 3D printer and need the convert the plot from the Maple file into an .stl file.

Here is the posting I am referencing:

Thingiverse/3dmodelimportexport.pdf

I was able to follow the commands successfully in the referenced paper for a hyperboloid or revolution that I plotted in Maple - it was very helpful. However, I could not figure out how to access the temporary .stl file that was created so that I could open it using my 3D printer's software.

My question is: Once I execute the "exportplot(stl, hyprev)" command that I inputted, how can I find the file in the Temporary Directory in order to open it from the software I use for my 3D printer?

I would appreciate any further details you can provide for accessing the temporary .stl file I created in order to be able to print the object.

Thank you!

## Issues with exporting plots using Open Maple...

Hi,

I'm trying to export a plot using the open maple api but it looks like open maple API doesnt support certain specific features.

Eg. "Export(\"images\\\result1.gif\", plot(sin(x), title = \"The sine function\", thickness = 3, gridlines=true));"

Above works fine when executing in actual maple application (i.e. correctly exports with gridlines) however doing the same via open maple api it does export the chart but not the specified gridlines.