gkokovidis

2355 Reputation

13 Badges

20 years, 121 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

cfrac looks like the right command for your problem.

restart:with(numtheory):

cfrac(3/11+3*sqrt(3),50,'quotients');

[5, 2, 7, 1, 1, 6, 1, 627, 1, 6, 1, 1, 7, 2, 9, 1, 12, 16, 1, 10, 1, 4, 3, 1, 1, 2, 1, 14, 2, 3, 10, 9, 1, 1, 139, 5, 5, 3, 2, 3, 6, 1, 1, 1, 9, 1, 2, 1, 6, 1, 2, `...`]

(1)

 

Download cfrac.mw

 

Regards,

Georgios

See example here:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=plot/parametric

 

Regards,

Georgios Kokovidis

Dräger Medical

ans:=solve({alpha = (1/2)*lambda*alpha*Pi, beta = (1/2)*lambda*beta*Pi}, lambda);

eval(lambda^6,ans);

Regards,

Georgios

See the help file for time.  ?time at the command prompt.  Typical usage below.

st := time():
... statements to be timed ...:
time() - st;

Regards,

Georgios

See the Maple help page below.

http://www.maplesoft.com/support/help/maple/view.aspx?path=plots%2Fsurfdata

The surfdata command with the option dimension=2 looks similar to what the Matlab help page

for pcolor describes.

 

Regards,

Georgios

Without limits, Maple will default to -10..10 for x.  Try it and see.  The range of x depends on what part of the function you are interested in viewing.  Pick your range accordingly.  Start with the default, and then modify the range to meet your requirements.  If  you do not have requirements, then you might choose to settle for the default.

restart:

plot(-x^3+2*x+1/4,x);

 

plot(-x^3+2*x+1/4,x=0..3);

 

plot(-x^3+2*x+1/4,x=-6..-1);

 

 

Download plot.mw

 

Regards,

Georgios

You can ue display, part of the plots package, to combine more than one plot.

restart:with(plots):

f:=x->x^2;

proc (x) options operator, arrow; x^2 end proc

                                                                                                                                                                                   (1)

p1:=plot(f,-3..3):

p2:=pointplot([[1,1],[2,4]],color=[red,blue],symbol=circle,symbolsize=25):

display(p1,p2);

 

 

Download plotwithpoints.mw

Regards,

Georgios

Here is one more option, using Roots, from the Student[Calculus1] package.

restart:with(Student[Calculus1]):
f:=x->(7-x)*sin(x^2-7);
f1:=D(f);
Roots(f1(x), -2.4 .. 2.4, numeric);
                 [-2.334981494, -1.525138568, -0.06124071559, 1.492263788, 2.320169646]

Regards,

Georgios

One more option is to use the built in tutor.  It will display the function, the secant lines (as many as you select, as well as an animation, similar to what is shown by Tom Leslie.

Student[Calculus1][TangentSecantTutor]();

This can be found under Tools-Tutors-Calculus-SingleVariable-Secants...

 

Regards,

Georgios Kokovidis

Dräger Medical

Here is one way, building on the solution from your previous question..


restart:

f:=x->80*x-2*x^2;

proc (x) options operator, arrow; 80*x-2*x^2 end proc

                                                                                                       (1)

plot(f);

 

Aprime:=diff(f(x),x);

-4*x+80               

                                               (2)

solve(Aprime=0,x);

20                                                                         

(3)

 

Download PlotFunc.mw

Regards,

Georgios Kokovidis

Dräger Medical

Looks like you are missing a multiplication sign before the 'x' and before the 'x^4'.  Try it and see what happens.

Edit:  I was wrong.  See replies below.

Regards,

Georgios

I created this worksheet a while ago to do what the OP is asking.  The spice netlist at the end of the worksheet is a sanity check.  It can be run with LTspice, which is available for free.

restart:Digits:=20:

 

Add two AC waveforms:  For example 150<80 and -10<-260

 

First, define the magnitude(s). .

mag1:=150;

150

(1)

mag2:=-10;

-10

(2)

Define each of the angles.  For the example below, the 1st angle is -90 and the second angle is -180.

ang1:=evalf(convert(80*degrees,radians));

1.3962634015954636615

(3)

ang2:=evalf(convert(-260*degrees,radians));

-4.5378560551852568999

(4)

 

Convert from polar to rectangular for each of the magnitude,angle pairs.

p2r1:=[mag1*cos(ang1),mag1*sin(ang1)];

[26.047226650039552334, 147.72116295183120890]

(5)

p2r2:=[mag2*cos(ang2),mag2*sin(ang2)];

[1.7364817766693034895, -9.8480775301220805935]

(6)

 

 

Add the two together.

sum_mags:=p2r1+p2r2;

[27.783708426708855824, 137.87308542170912831]

(7)

Magnitude.

abs(sum_mags[1]+(sum_mags[2]*I));

140.64466622535770677

(8)

 

Angle, which gets converted to degreees.

argument(sum_mags[1]+(sum_mags[2]*I)):

evalf(convert(%,degrees));

78.606542061259769360*degrees

(9)

ac voltage addition spice netlist example - phasor domain analysis
# linear analysis line: 100 point sweep from 60 to 60, therefore no plot window
# will show up.
 
v1 1 0 ac 150 80
v2 2 1 ac -10 -260
  
#v2 2 1 ac 12 35 sin     
#v3 3 2 ac 22 -64 sin
    
#v3 3 2 ac 0.001 0 sin
rdummy 3 2 0.01    
r1 3 0 10k      
.ac lin 100 60 60            
.print ac v(3,0) vp(3,0)
.end

 

       --- AC Analysis ---

frequency:        60        Hz
V(3):        mag:    140.645   phase:    78.6065°         voltage

 

Download phasor_voltage_addition_example.mw

Regards,

Georgios

One more way to complement what has been answered.

 

You can pass a floating point number to each of the commands.

ln(3.0)

exp(5.0)

The results will be the same as using evalf on an integer.

 

Regards,

Georgios Kokovidis

Dräger Medical

Use restart instead of Restart.  It is case sensitive. 

The problem lies with your use of ?gamma, which has an internal value.  You can declare is as local and use it.  Otherwise, if you want to use it as global, call it something like ggama or change the name completely and see if you get the desired result.

 

Regards,

Georgios

Attach your file using the big green up arrow.  Without the file, we can't help.

 

Regards,

Georgios Kokovidis

Dräger Medical

4 5 6 7 8 9 10 Last Page 6 of 75