gkokovidis

2180 Reputation

11 Badges

16 years, 194 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are replies submitted by gkokovidis

Interesting topic.  The size of the worksheet should be independent with respect to the actual input (typing) and speed of typing.  What do other programs that require user input do (that is why I held one of the keys down, to be consistent).  None of the programs that I have tried with user input (word processor, e-mail client, ...) stay at 0% cpu usage.  They are not at 30%, but stay at 15% to 18% on my machine.  I am not defending the Maple UI CPU usage value.

 

Regards,
Georgios Kokovidis
Dräger Medical

@ home I use my laptop running WinXP on a dual core Intel @ 2 GHz.  My results are similar to what is posted above this.  In order to maintain consistency between typing w.r.t. to different apps, what I did was hold my finger down on one of the keys and watch the characters scroll across the screen.  This way, when I repeat the same experiement, say in a text editor, there is no discrpancy relative to the speed of my "typing".  It seems the Maple keyboard parser is loading the CPU more than other apps when performing the same tasks.  My $0.02 on this. 

P.S.  Why does this matter?  What I am asking is this:  When I am typing my code into Maple, what difference does is make if the CPU is at 30 % or at 10%?  Just asking.

 

Regards,
Georgios Kokovidis
Dräger Medical

Hello Joe.  I think the link here can be a starting point for incorporation, since this topic has come up before.  For new users of Mapleprimes, there needs to be a better path to this section from the main navigation/start page.  Right now it is not clear where you would even begin if you are visiting Mapleprimes for the 1st time.  My $0.02 on this.

 

Regards,
Georgios Kokovidis
Dräger Medical

Try plotting it.  What are you solving for?

plot((-1/x)*ln(1-x)-x+2,x=-2..1);

fsolve will give you an answer with the complex option.

fsolve((-1/x)*ln(1-x)-x+2,x,complex);

2.236756628-.9959964853*I

 

Regards,
Georgios Kokovidis
Dräger Medical

Maybe something like this, from a previous post dealing with Mandelbrot and animation?

Regards,
Georgios Kokovidis
Dräger Medical

Take a look at the attached file, and see if this is what you are looking for.  It is the same thing as Erik Postma typed out, except it uses the "long form" of the plot and Fit commands.  The plots package and the Statistics package get loaded at the beginning of the worksheet, and then the rest of the commands are executed.  If this does not look right, then explain your problem more clearly, or what does or does not look right to you.

Download 221_stat_fit.mws

 

Regards,
Georgios Kokovidis
Dräger Medical

Take a look at the attached file, and see if this is what you are looking for.  It is the same thing as Erik Postma typed out, except it uses the "long form" of the plot and Fit commands.  The plots package and the Statistics package get loaded at the beginning of the worksheet, and then the rest of the commands are executed.  If this does not look right, then explain your problem more clearly, or what does or does not look right to you.

Download 221_stat_fit.mws

 

Regards,
Georgios Kokovidis
Dräger Medical

The following package from the Application Center might be useful to you. 

Regards,
Georgios Kokovidis
Dräger Medical

This package is written in Maple.  When you load it, you will see a list of procedures that are part of that package.  Then you can display each of them using the showstat command.

>with(combinat);

[Chi, bell, binomial, cartprod, character, choose, composition, conjpart, decodepart, encodepart, fibonacci, firstpart, graycode, inttovec, lastpart, multinomial, nextpart, numbcomb, numbcomp, numbpart, numbperm, partition, permute, powerset, prevpart, randcomb, randpart, randperm, setpartition, stirling1, stirling2, subsets, vectoint]

 

>showstat(numbcomb);

 

combinat:-numbcomb := proc(n::{set, list, nonnegint}, m::integer)
local x;
   1   if nargs = 1 then
   2     if type(n,'integer') then
   3       2^n
         elif nops(n) = nops({op(n)}) then
   4       2^nops(n)
         else
   5       convert([coeffs(gf_combinations(n,nops(n),x))],'`+`')
         end if
       elif type(n,'integer') then
   6     combinat:-binomial(n,m)
       elif type(n,'set') or type(n,'list') and nops(n) = nops({op(n)}) then
   7     combinat:-binomial(nops(n),m)
       else
   8     coeff(gf_combinations(n,m,x),x,m)
       end if
end proc
 

 

Regards,
Georgios Kokovidis
Dräger Medical

I have been running multiple versions of Maple on Windows for a long time.  Currently I have V.9.5 thru V12 running on my laptop with WinXP.  Same goes for my workstation with WinXP.  I do not use Vista, so I can not comment, but I imagine it is the same.

 

Regards,
Georgios Kokovidis
Dräger Medical

A possible workaround.  Putting the package commands with(geometry): and with(plottools): on the same line after the restart command caused an error.  The code below was created in v9.52.  It works in v12 without modifications.

 

>restart:
>with(geometry):
>triangle(T,[point(A2,0,0),point(A1,0,4),point(A3,7,0)]):
>b:=draw(T,thickness=4):
>with(plottools):
>a:=arc([0,0],1,Pi/2..0,color=blue,thickness=3):
>plots[display](a,b);

Regards,
Georgios Kokovidis
Dräger Medical
 

Take a look at the help files for the display command

?display

Also look at the help files for the plot command with color options.

?plot/color

 

Regards,
Georgios Kokovidis
Dräger Medical

Take a look at the help files for the display command

?display

Also look at the help files for the plot command with color options.

?plot/color

 

Regards,
Georgios Kokovidis
Dräger Medical

restart:
f:=x->x^2-5;
v:=diff(f(x),x);
x:=1:
n:=0.0001:
err:=n+1:
 
      while err>n do
         a:=x-(f(x)/eval(v(x))):
           print(evalf(a)):
         err:=evalf(abs(a-x)):
 x:=evalf(a):
 
     end do:

 

Regards,
Georgios Kokovidis
Dräger Medical

An example of solving an ordinary differential equation,
expanding on what Joe Riel posted above.

A typical problem from a textbook:

Solve the differential equation y''+ y = 0 with
initial conditions of y(0)=1 and y'(0)=1 using
laplace transforms.

>restart:with(inttrans):

>d1:=diff(y(t),t,t)+y(t)=0;

d1 := diff(y(t),`$`(t,2))+y(t) = 0

 >lt_d1:=laplace(d1,t,s);

lt_d1 := s^2*laplace(y(t),t,s)-D(y)(0)-s*y(0)+laplace(y(t),t,s) = 0

 >solve(lt_d1,laplace(y(t),t,s));

(D(y)(0)+s*y(0))/(s^2+1)

 >subs({y(0)=1,D(y)(0)=1},%);

(1+s)/(s^2+1)

 >invlaplace(%,s,t);

cos(t)+sin(t)

 

Regards,
Georgios Kokovidis
Dräger Medical

First 9 10 11 12 13 14 15 Last Page 11 of 23