WD0HHU

50 Reputation

4 Badges

4 years, 232 days

MaplePrimes Activity


These are replies submitted by WD0HHU

@dharr Depending on the resolution of your laptop or desktop monitor, you can adjust the size of the plots with view command to fill out the plots.  This is a great illustration of the derivative of a function.  I wished I had something like this 54 years ago when I was taking freshman calculus at Purdue University.
 

restart; with(plots); s := proc (t) options operator, arrow; 2*t^4-30*t^3+135*t^2-120*t-10 end proc; diff(s(t), t); v := proc (t) options operator, arrow; diff(s(t), t) end proc; p1 := plot(s(t), t = 0 .. 8, 'gridlines', 'color' = "red", 'title' = "Plot of s(t)", background = "Azure", size = [1700, 800], axesfont = [Helvetica, bold, 14], view = [default, -100 .. 500], titlefont = [Helvetica, bold, 18], labelfont = [Helvetica, bold, 24], axis[1] = [location = low], thickness = 4, annotation = typeset("t =", ('xcoordinate')(digits = 6), " ", "  s(t)= ", ('ycoordinate')(digits = 6), " "), labels = [t, "s(t)"], labeldirections = [Horizontal, Vertical]); p2 := plot(v(t), t = 0 .. 8, 'gridlines', 'color' = "blue", 'title' = "Plot of v(t)", background = "Azure", size = [1700, 800], axesfont = [Helvetica, bold, 14], view = [default, -200 .. 300], titlefont = [Helvetica, bold, 18], labelfont = [Helvetica, bold, 24], axis[1] = [location = low], thickness = 5, annotation = typeset("t =", ('xcoordinate')(digits = 6), " ", "  v(t)= ", ('ycoordinate')(digits = 6), " "), labels = [t, "v(t)"], labeldirections = [Horizontal, Vertical]); plots:-display(Array([p1, p2]))

proc (t) options operator, arrow; 2*t^4-30*t^3+135*t^2-120*t-10 end proc

 

8*t^3-90*t^2+270*t-120

 

proc (t) options operator, arrow; diff(s(t), t) end proc

 

 

 

 

 

 

 

DocumentTools:-Tabulate([p1, p2], width = 50)


 

Download SideBySidePlotting.mw

Hello @acer! My version of Maple is `Maple 2025.2, X86 64 WINDOWS, Nov 11 2025, Build ID 1971053` and I tried to upload the file to you but somehow it did not happen.  I notice that you are using a Linux version of Maple 2025.2.  This is interestesing and a little disturbing that there are differences in the results based on whether one is using Windows versus Linux.  

Hello @acer! I tried your worksheet and I didn't get the zero on the last simplify statement.  I'll upload my worksheet.

@acer I agree with the user `nm` that the Explore command could definitely be improved.  This should be considered as a major improvement in the next upgrade to Maple.  You can't set the fonts in the sliders, for example.  Also, you can't set the font of the tick marks.  The font size is hard to read.  You can't set the font size of the value of the slider on the right.  This is not the best example of an important command like Explore.  I wish it would get improved at some point in the near future.

Dear Mr. @Lark!  Thank you so much for taking the time to tell me this.  Sometimes the Maple designers think something is "totally obvious to the most casual observer".  I never knew what this very little icon was supposed to do.  You would have thought it was a setting under "Tools" or "View" or some other straight forward location.  

Thank you again.  I almost at the end of my rope and was thinking I had to call Maple Tech Support! 

Hello @sand15! Your last 2D plot is quite aesthetically pleasing to look at with size=[1200,1200].

Thank you.

Hello @sand15! I made the one line of code change that acer suggested and it looks like it works!!

I had one question is this is more for my "feeble" eyes: Could you increase the size of the plots to size=[1200,1200]?  I can't seem to find where I can do that in your worksheet. 

Thank you.

P.S. I'll try to upload this updated worksheet but recently my uploads to MaplePrimes blog have been kicked out because it thinks I'm upload SPAM!! HA HA!!

@sand15  I downloaded your "plot-help_sand15.mw" and I get several errors that prevents it from completing the plots, for example:

z_period := 2*Pi/coeff(op(select(has, %, cos)[]), z) / 2;  # (division by 2 because solnum depends on core^2, not core)

  core := csc((225.6950581 - 0.8870967598 I) + 0.48387096 I y

     - 2.419354805 z)

    {|csc((225.6950581 - 0.8870967598 I) + 0.48387096 I y

       - 2.419354805 z)|, csc((225.6950581 - 0.8870967598 I)

       + 0.48387096 I y - 2.419354805 z)}

Error, invalid input: op expects 1 or 2 arguments, but received 0

And this one also:

display(seq(plottools:-translate(pat, 0, z_period*k), k=0..4)):

Error, (in plot/iplot2d:-Levels) could not evaluate expression
Error, (in plottools:-translate) invalid plot structure: pat

And finally this one:

pat := display(
           contourplot(A(y, z, r3, f, 2000), y = -3 .. 7, z = 0.. z_period, s3, grid = G,size=[1200,1200])
         , contourplot(A(y, z, r2, f,  100), y = -3 .. 7, z = 0.. z_period, s2, grid = G,size=[1200,1200])
         , contourplot(A(y, z, r1, f,   10), y = -3 .. 7, z = 0.. z_period, s1, grid = G,size=[1200,1200])
         , scaling=constrained
       ):

pat:

Error, (in plot/iplot2d:-Levels) could not evaluate expression

I would like to see your work complete successfully.  I have always learned about a lot about using Maple from your advice and suggestions.  Thank you.

Hello @rquirt!  Don't forget you need to load the numapprox package for the Pade approximation.

I keep trying to upload the file which I do my Pade approx in a control systems analysis but Mapleprimes REFUSES to accept it.  I don't know why.  It is just a *.mw file.  Nothing fancy.  Mysteries abound!!

Dave 

P.S.  Have a nice Thanksgiving Day wherever you reside!!

@WD0HHU 

Try putting a 4 in the numerator and a 4 in the denominator.

Hi @acer! I keep trying to upload a *.mw file and it won't accept it.  I am not getting a "warm-fuzzy" that this blog is accepting it.  I don't know why. 

@rquirt 

I'll try again.  I have to go to another computer.  So it should be here shortly.  I'll shorten the name.

@rquirt 

ZOH := (tau, PadeNumerOrder, PadeDenomOrder) -> normal((1 - pade(exp(-tau*s), s, [PadeNumerOrder, PadeDenomOrder]))/(tau*s))

F1 := (tau, PadeNumerOrder, PadeDenomOrder) -> map(sort, pade(exp(-tau*s), s, [PadeNumerOrder, PadeDenomOrder]), s)

Test these out.  The "tau" input is the time delay.

@rquirt Take a look at this & I'll search my Maple worksheet files to give you hard example on using Pade approximations for delays in control systems 

1 2 3 4 Page 1 of 4