KonstantinW

240 Reputation

9 Badges

18 years, 74 days
Kharkov, Alaska, United States
PhD in Numerical Optimization

MaplePrimes Activity


These are questions asked by KonstantinW

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:

12

 

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

1
in one list (placed in one cell)?

In Maple I use tables for these purposes:

1

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

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;

but

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:

0

1

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

1

Is it possible to fix the problem?

I solve numerically very simple boundary value problem for the following ordinary diff. equation:

-1.2*y''(t)+0.8*y(t)=2,

y(0)=1, y(1)=0.

So := dsolve([-1.2*diff(y(x), x$2)+0.8*y(x) = 2, y(0)=1, y(1)=0], y(x), 'numeric', 'output' = listprocedure);

Solution looks as needed

u := unapply(rhs(So[2])(x), x): plot(u(t), t=0 .. 1);
pic

and can be numerically integrated in usual way:

evalf(int(u(t), t = 0..1));

0.6041717543123311

But integral of u^2(t)  (evalf(int(u(t)^2, t = 0..1))) returns:

pic1

How to avoid this issue?

3 4 5 6 7 Page 5 of 7