gkokovidis

2335 Reputation

13 Badges

20 years, 299 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

If BoxPlot by itself does not give you exactly what you are looking for, you can add to it by combining plot structures, using the ?display command.  ?textplot will allow you to annotate the plot wherever and however you like as well.

restart:with(plots):with(Statistics):

A := [seq(Sample(Normal(ln(i), 3), 100), i = 1 .. 5)]:

B:=BoxPlot(A, title = "Box Plot", color = red .. yellow, deciles = false, outliers=true):

C := `<,>`(6, 7, 8, 8, 7):

CC := `<,>`(6.3, 7.4, 8.5, 8.6, 7.7):

E:=PointPlot(C,symbol=solidcircle,symbolsize=20,color=green):

F:=PointPlot(CC,symbol=solidcircle,symbolsize=20,color=blue):

G:=textplot([5.4, 7, "outliers"]):

display(B,E,F,G);

 

Download BoxPlot.mw

Regards,

Georgios Kokovidis

Dräger Medical

When you rotate a 3d plot, the values of theta, phi, and psi are displayed in the context menu bar.  See this help page for more details.  You can use these values in the plot3d command directly once you are satisfied with the view orientation of the plot.  Are you looking for something else?

 

Regards,

Georgios Kokovidis

Dräger Medical

Try increasing the number of points used to render the plot, and see if it is acceptable for your needs/

Using the above plot statement, the line is concstant from x=0 to 4.6*10^2.

Regards,

Georgios Kokovidis

Dräger Medical

At the main Maple website, click on Support, and then Download Product Updates.  It will take you here.

 

Regards,

Georgios Kokovidis

Dräger Medical

Here is another example using ?solve instead of fsolve.  Either way, you will get what you are looking for.

restart:

r:=solve(sin(x)=0,x,allsolutions);

Pi*_Z1

(1)

seq(eval(r, op(indets(r)) = i),i=0..10);

0, Pi, 2*Pi, 3*Pi, 4*Pi, 5*Pi, 6*Pi, 7*Pi, 8*Pi, 9*Pi, 10*Pi

(2)

 

Download solve.mw

Regards,

Georgios Kokovidis

Dräger Medical

I haven't tried it, but just looking at the "seq" comman I noticed m1.  Maple is case sensitive.  What is m1?  Where is it defined?

 

Regards,

Georgios Kokovidis

Dräger Medical

The topic of numerical Laplace inversion was discussed before here.  You will also find Maple code as well as examples.

There is a paper discussing de Hoog here, which you can use as a guide if you want to rewrite the code samples in Maple.

You can find C source code for de Hoog here.

Regards,

Georgios Kokovidis

Dräger Medical

Look at the help files for ?display and ?textplot for starters.  In order to do what ?CurveAnalysisTutor does manually, you have to build the plot piece by piece and then display it all at once at the end, when you have everything you need.  Here is an example, not exact to what ?CurveAnalysisTutor does with (5*x)/(x^2-4), but close enough to give you an idea that you can build on.

restart:with(plots):

p1:=plot((5*x)/(x^2-4),x=-6..-2.05,color=red,filled=true):

p2:=plot((5*x)/(x^2-4),x=-1.95..0,color=blue,filled=true):

p3:=plot((5*x)/(x^2-4),x=0..1.95,color=yellow,filled=true):

p4:=plot((5*x)/(x^2-4),x=2.05..6,color=green,filled=true):

display(p1,p2,p3,p4);

 

 

Download plot.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

A few more ways, to complement the plot, in order to find the real part of the solution.

restart:

f:=x->a/x^2-3*x+2:

g:=x->a*sin(2*x):

ans:=allvalues(solve(f(f(-1))=sqrt(2)+g(f(2)),a)):

ans2:=[evalf(ans)];

[13.02210936-4.135282756*I, 13.02210936+4.135282756*I, -5.81217740]

(1)

 

restart:

f:=x->a/x^2-3*x+2:

g:=x->a*sin(2*x):

ans:=fsolve(f(f(-1))=sqrt(2)+g(f(2)),a);

 

-5.812177402

(2)

 

Download solve_fsolve.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

I am sure that it is one of many answers that satisfy your original question of finding z(1+I) + I  = 0, for z. See comments by Axel Vogt and ?solve/details for more help on this.

If helpwas not a valid solution, then this statement

 

evalc(subs(z=ans,eqn));

 

would not evaluate to 0=0, showing that the left hand side is equal to the right hand side.

Regards,

Georgios Kokovidis

Dräger Medical

I did not take into account an error for long and complicated expressions.  I was only looking at exp((-1/4-1/4*I)*Pi)   and  (exp(3*Pi*(1/4)))(-sqrt(2*(1/2))+I*sqrt(2*(1/2))).

 

Regards,

Georgios Kokovidis

Dräger Medical

You can check by using ?evalf on each of them to see a "simplified" floating point approximation.  If they were equivalent, then you can subtract one from the other and get zero (0) as an answer. 

 

Regards,

Georgios Kokovidis

Dräger Medical

See ?solve help page for details and examples.

restart:

eqn:=(z^(1+I))+I=0;

z^(1+I)+I = 0

(1)

ans:=solve(eqn,z);

exp((-1/4-(1/4)*I)*Pi)

(2)

evalc(subs(z=ans,eqn));

0 = 0

(3)

 

Download solve.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

For the "set the tolerance zero to some vale" part of your question, see the help page for ?fnormal.  You can use it for each of your results with the optional error tolerance.  This shouldl give you what you are looking for.

restart:

a:=1e-5;

0.1e-4

(1)

b:=1e-6;

0.1e-5

(2)

c:=1e-12;

0.1e-11

(3)

d:=1e-13;

0.1e-12

(4)

fnormal([a,b,c,d],20,1e-4);

[0., 0., 0., 0.]

(5)

fnormal([a,b,c,d],20,1e-5);

[0.1e-4, 0., 0., 0.]

(6)

fnormal([a,b,c,d],20,1e-12);

[0.1e-4, 0.1e-5, 0.1e-11, 0.]

(7)

fnormal([a,b,c,d],20,1e-3);

[0., 0., 0., 0.]

(8)

 

Download fnormal.mw

 

Regards,

Georgios Kokovidis

Dräger Medical

Thanks for the correction.  In my haste, I did not pay attention to the exp() when looking @ the help file.

 

Regards,

Georgios Kokovidis

Dräger Medical

First 8 9 10 11 12 13 14 Last Page 10 of 75