Doug Meade

 

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

MaplePrimes Activity


These are replies submitted by Doug Meade

The original post included a question about plotting the phase portrait. This is easily obtained, using plots:-odeplot, when working with the ODEs in polar coordinates.

You did not provide any initial conditions, so I will have to make a guess: r(0)=1/2, theta(0)=0.

with( plots ):
SYS := [ diff(r(t),t)=sin(Pi*r(t)), diff(theta(t),t)=1 ];
IC := [ r(0)=0.5, theta(0)=0 ];
SOL := dsolve( [SYS[],IC[]], [r(t),theta(t)], numeric );
odeplot( SOL, [r(t)*cos(theta(t)),r(t)*sin(theta(t))], t=0..10,
         numpoints=1000, scaling=constrained );


This looks believable.

I hope this is helpful.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

The original post included a question about plotting the phase portrait. This is easily obtained, using plots:-odeplot, when working with the ODEs in polar coordinates.

You did not provide any initial conditions, so I will have to make a guess: r(0)=1/2, theta(0)=0.

with( plots ):
SYS := [ diff(r(t),t)=sin(Pi*r(t)), diff(theta(t),t)=1 ];
IC := [ r(0)=0.5, theta(0)=0 ];
SOL := dsolve( [SYS[],IC[]], [r(t),theta(t)], numeric );
odeplot( SOL, [r(t)*cos(theta(t)),r(t)*sin(theta(t))], t=0..10,
         numpoints=1000, scaling=constrained );


This looks believable.

I hope this is helpful.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

SendRequest appears to be the real engine behind the HTTP package.

showstat( Post, 10 );

HTTP:-Post := proc(uri, content)
local parsed_uri;
       ...
  10   SendRequest["POST"](parsed_uri["host"],parsed_uri["port"],cat(parsed_uri["urlpath"],parsed_uri["query"]),content,args[3 .. -1])
end proc

showstat( Get, 10 );

HTTP:-Get := proc(uri)
local parsed_uri;
       ...
  10   SendRequest["GET"](parsed_uri["host"],parsed_uri["port"],cat(parsed_uri["urlpath"],parsed_uri["query"]),"",args[2 .. -1])
end proc

Where can I find more about SendRequest?

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

SendRequest appears to be the real engine behind the HTTP package.

showstat( Post, 10 );

HTTP:-Post := proc(uri, content)
local parsed_uri;
       ...
  10   SendRequest["POST"](parsed_uri["host"],parsed_uri["port"],cat(parsed_uri["urlpath"],parsed_uri["query"]),content,args[3 .. -1])
end proc

showstat( Get, 10 );

HTTP:-Get := proc(uri)
local parsed_uri;
       ...
  10   SendRequest["GET"](parsed_uri["host"],parsed_uri["port"],cat(parsed_uri["urlpath"],parsed_uri["query"]),"",args[2 .. -1])
end proc

Where can I find more about SendRequest?

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

The HTTP package looks to have a lot of potential. However, while I can load the package in both Maple 11.02 and Maple 12, I do not see any documentation in either version of Maple. Is there somewhere I can see the full documentation for this package.

The meat of the package seems to be a SendRequest procedure. I have not been able to find any information about SendRequest. Can anyone give any pointers on this procedure and how it is designed to be used?

Thanks in advance,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

The HTTP package looks to have a lot of potential. However, while I can load the package in both Maple 11.02 and Maple 12, I do not see any documentation in either version of Maple. Is there somewhere I can see the full documentation for this package.

The meat of the package seems to be a SendRequest procedure. I have not been able to find any information about SendRequest. Can anyone give any pointers on this procedure and how it is designed to be used?

Thanks in advance,

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Acer,

Yes. My reasoning is exactly the opposite to what Maple does. I'm sure I could have found a way to argue for the current situation, but I do prefer what I did write.

I think there are explicit examples to support each of our positions. I do not believe one position is "right".

While I do like it when Maple makes good choices for me, I prefer it when Maple gives me the opportunity to decide what it should do. Defaults have to be chosen. But, I'd like it if Maple was more transparent about how it was evaluating (in this case) a definite integral - and if it were more convenient to modify those defaults.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

I cannot speak for the developers, but I can see a distinction in the two cases. When there are no floats in the integrand, it could be reasonable to look for a symbolic antiderivative. Whereas, when the integrand contains floating point numbers, it can be assumed that numerical integration is what is desired.

I hope someone with more direct involvement with the design of this "feature" can confirm or refute this, and add to the discussion.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Good points. But, you can resize an inline plot window. You cannot set the size explicitly, but you can drag a corner to resize the plot. And, I believe it's still true that if you recreate the plot without deleting the previous one, the new plot will inherit the size of the previous one.

This is not the desired way to control a plot window. I wish it were possible to set some global properties (size, orientation, axes, shading, legend, axes, ....) about a plot and have these automatically applied to any plots. I know how this can be done through the command line, up to a point, but it would be nice if the GUI really supported the professional document preparation. The document interface is a start, but there is still a long way to go, in my opinion.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Rich,

Your last message included the following:

It would be so much easier if I didn't need to use the embedded component, but I suspect that I will use the components more as I get better with Maple and my docs become more sophisticated.

Why do you think you "need to use the embedded component"? The plots[display] command immediately above the component displays the same information directly in the document.

Now, this plot is not going to update automatically. It will be updated each time the command is executed. You might be able to put all of your commands in the startup code for the document and then re-execute the entire document (by clicking on !!! icon). That's the closest I can come to auto-updating within Maple.

Have I addressed your comment about feeling that you need to use components?

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

Rich,

If I understand the situation correctly, you want Maple to act like a spreadsheet. When you update the plot, you want all related elements to automatically update. This is not the way Maple works (and for good reasons, most of the time).

Some "action" is required to cause the plot to update. Within the plot component,

1. edit the "action when clicked" script to read:

use DocumentTools in 
  Do( %Plot6="plots[display]([p10, p11, p12, p13], axes = normal,
      caption = `Figure 3. Sonobuoy Pulse Propagation Over Time, 3D`,
      labels = [x, y, t], orientation = [-130, 70],
      view = [-180 .. 180, -180 .. 180, 0 .. 1.75])");
end use;

Note the use of back quotes (`) around the caption.

2. check the "make 'execute code' the default manipulator' box at the bottom of the edit window

3. click OK, to close the edit window, and once more to close the properties window.

Now. It appears you have to be very careful about where you click in the component. If you click in the middle, this is taken as a grab to rotate the plot. But, if you click close to the edge, in what is probably  the border between the plot region and the boundary of the plot component, you will see that the plot updates. (To test the action, you need to change something in the options for at least one of p10, p11, p12, and p13.)

Personally, in this type of a situation I would suggest inserting a button next to the plot. In its components, set the caption to "Update Plot" and edit the "action when clicked" to be what is listed above. Click OK to close the edit window, click OK once more to close the button properties window. Now, click on your new button and, voila, the plot is updated. One reason I like the button approach is that you can put several Do commands in its action script and update an entire collection of component properties.

I can post the worksheet if desired, but I think these directions are pretty straightforward.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

 

To submit a Maple Software Change Request (SCR), look at the Navigation section in the left column of the MaplePrimes window, under the heading of Create post the last entry is the one you want.

tDoug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

I, too, would like to see the existence of  a Maple Player, along the lines of Adobe's Acroread. But, the Maple Reader is not the answer. It is my understanding that the Maple Reader, and its .mbook files, are intended for use with e-books created as Maple documents. This all makes sense, and should ultimately be useful, but it's not the Maple Player that so many of us would like to see.

If it becomes possible for users to create a .mbook file from a .mw file, or if the Maple Reader could automatically present a .mw file, then it could fill this role. But, I doubt this is the long-term plan for the Maple Reader.

Still, with it being so difficult to produce a .mbook file, I wonder why the Maple Reader is included in the standard distribution of Maple.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

So, you have three points. You can follow my suggestions for this in my first response. The one thing I did not address is plotting the points. Try this:

PTS := [ [-3,10], [-1,0], [3,10] ];
plot( PTS, style=point );

If you want to combine the two plots (points and parabola), assign each plot to a name and then display the two plots:

PLOT1 := plot( PTS, style=point );
PLOT2 := plot( ... the parabola ... );
plots[display]( [ PLOT1, PLOT2 ] );

These should get you closer to your goal.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed

So, you have three points. You can follow my suggestions for this in my first response. The one thing I did not address is plotting the points. Try this:

PTS := [ [-3,10], [-1,0], [3,10] ];
plot( PTS, style=point );

If you want to combine the two plots (points and parabola), assign each plot to a name and then display the two plots:

PLOT1 := plot( PTS, style=point );
PLOT2 := plot( ... the parabola ... );
plots[display]( [ PLOT1, PLOT2 ] );

These should get you closer to your goal.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.ed
First 41 42 43 44 45 46 47 Last Page 43 of 76