215 Reputation

9 Badges

15 years, 317 days
PhD in Numerical Optimization.

MaplePrimes Activity

These are questions asked by Konstantin@

Dear friends.

I need a simple approach for reading a specified line of a text file.

FileTools[Text] module allows to count the lines. By sequential reading of lines it's possible to reach any position in the file. But for large file this takes a lot of time.

FileTools[Position] allows to set/get position in the file, but the position is counted in bytes.

Are there any workarounds for the problem or the use of Database Package is more preferable?

Maple function plot allows to build a linear plot for two vectors, when one vector contains X coordinates, another -- Y coordinates (similar to plot below):

Is it possible to build such a plot for several Y-vectors like this:



Is it possible to organize output of plots in Mathematica-like manner

in one list (placed in one cell)?

In Maple I use tables for these purposes:


Maybe, does there exist a more elegant solution?

I try to save results of numeric integration of ODE, returned by dsolve. I address very simple equation and before saving all works as needed:

S1 := dsolve([diff(z(x), x$2)+z(x) = -2, z(0)=0, z(1)=1], z(x), 'numeric', 'output' = listprocedure);

F1 := unapply(rhs(S1[2])(x), x); plot(F1, 0..1, thickness=3);

Next I save solution S1 by save operator:

save S1,  filename;

S1 saved and likely looks correctly:

S1 := [x = proc (x) local _res, _dat, _solnproc; option
`Copyright (c) 1993 by the University of Waterloo. All rights reserved.`; _dat
:= Array(1..4, {1 = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; ........................................................

Operator read reads S1 from file:
read filename;


F1 := unapply(rhs(S1[2])(x), x);

returns an error:

Error, (in unknown) invalid input: the 1st argument to pointto is not a valid pointer handle

How to save solution correctly?


Dear friends!

My question does not concern essential functioning of Maple and does not influence on any computation performance. But I ask you to pay attantion to it.

For a long time ago I noticed, that representation of some elements of Maple worksheets does not correspond to settings. For example, I would like to have 2D Ouput style in bold font, which I used in Classic interface in the years of my youth. I adjusted this style as needed:



Nevertheless, output font has a normal (no-bold) style:


Is it possible to fix the problem?

1 2 3 4 5 6 Page 4 of 6