Scot Gould

Prof. Scot Gould

292 Reputation

12 Badges

7 years, 75 days
Dr. Scot Gould is a professor of physics in the W.M. Keck Science Department of Claremont McKenna, Pitzer, Scripps colleges - members of The Claremont Colleges in California. He was involved in the early development of the atomic force microscope. His research has included numerous applications of scanning problem microscopes, particularly those which involved natural and synthetic fibers such as spider silk. He has more than 60 papers and his publications have been sited more than four thousand times. He has more recently been involved in developing and sustaining non-traditional interdisciplinary undergraduate science educational programs that involve biology, chemistry, physics, mathematical and computer science. He teaches the use of Maple to assist students to model and visual biochemical systems from a physical approach.

MaplePrimes Activity


These are questions asked by Scot Gould

I have a string which includes characters from the extended ASCII character set. I simply want to print the string. Nothing fancy. Hence my question is: how does one print characters from the extended ASCII character set so that they show up as the characters and not a bunch of empty boxes?  (A technique for UTF-8  character printing would be a bonus.)   

<Edit> For example, in integers, my string could be:

s := [56, 72, 157, 38];

Hence there printing of s as a string should be a 4 character / bytes entity: 

printf("%s", convert(s, bytes));

In preparing to sample problems, I came across this difference in an output depending upon the input type: 2d Input vs. Maple Input. Is there a typo on my part?


 

restart; kernelopts(version); Digits

`Maple 2020.1, X86 64 WINDOWS, Jun 10 2020, Build ID 1474787`

 

10

(1)

Very happy with the output of the following line:

x := evalf[30](3.0^1.2)

3.73719281884655197790004100992

(2)

 

But I'm confused about the output of the next line. Is it a limit to the calculation or a display problem?

a := evalf[30](3.0^(1.2))

3.737192819

(3)

 

and yet this next output looks fine:

b := evalf[30]( exp( 1.2 * ln(3)))

3.73719281884655197790004100989

(4)

 

Fortunately, there appears to be no difference between x and b:

evalf[30](x-b)

0.3e-28

(5)

 

But these next  lines suggest there is an actual limit in the calculation of a.

evalf[30](a-b)

0.15344802209995899011e-9

(6)

evalf[30](a - b);

0.15344802209995899011e-9

(7)

Note - when Digits is set to 30, the calculation difference between x and a disappears.

``


 

Download 2020_evalf_digits.mw

With Maple 2020, I have been experiencing some odd behavior of simple 2D plots. For example, I plotted two functions on the same graph, and the default view did not contain the full upper or lower limits of both functions. (Sorry, I chose to move on and so I am unable to reproduce this outcome – but it has happened more than once.)  

Now I am experiencing another limited view of a plot, this time a single function. In creating a simple example of the SIR model, I have dsolve output a list of procedures so that I can plot them as functions. But when I plot one of the functions, it does not plot the entire function from the lower to the upper limit. Am I alone in experiencing this outcome? Is there something I am doing wrong that is causing this behavior?

 

restart; plots:-setoptions(size = [300, 300])

s_eq := diff(s(t), t) = -ir*i(t)*s(t); i_eq := diff(i(t), t) = ir*i(t)*s(t)-rr*i(t); d_eq := diff(d(t), t) = dr*i(t); ics := s(0) = s0, i(0) = i0, d(0) = 0

"i0:=1.E3:    P0:=3.E8:    drate:=0.02:     s0:=0.6*P0:    ir:=(0.1)/(s0):   rr:=1/(30.):  dr:=rr*drate:   "

sol := dsolve({d_eq, i_eq, ics, s_eq}, numeric); tf := 120; plots:-odeplot(sol, [t, d(t)], 0 .. tf)

 

sol := dsolve({d_eq, i_eq, ics, s_eq}, numeric, output = listprocedure); i := eval(i(t), sol); s := eval(s(t), sol); d := eval(d(t), sol)

tf; plot(d(t), t = 0 .. tf)

120

 

 

plot(d(t), t = 0 .. tf, view = [0 .. 150, 0 .. 40000])

 

``


 

Download plot_view_problem.mw

Based on an answer to a question posted on MaplePrimes, which I am I able to locate through the search system, but that I know it is recent, I am trying to calculate the parameters of a function which minimizes the result of a numerical integral. The function, f1(x), is well defined. The function f2(x) has two parameters, K and r. The integral of the square of the difference between the two function cannot be solved symbolically. Hence my plan is to use the Minimization function in Optimization to determine the values of K and r. 

The attached worksheet includes two examples - a practice example for me to become familiar with using Optimization:-Minimization for an integral and the actual problem I am attempting to solve. Note: it was only through MaplePrimes that I learned the function must be defined through a procedure. Here is what I discovered in my experiments:

* the command to perform the numerical integration requires the small "i" verion of int, not Int, i.e evalf( int( function, limits )), not evalf(Int(..)).  This seems to be inconsistent with the documentation. Can someone explain why it is this way?

* The function must be defined locally. If I try to use a globally defined function, non-numeric results are encountered. Is there a way to integrate a global function?

* For the practice problem, it works as long as I abide by the conditions in the previous 2 bullet points.

* When I try to solve the real problem, which appears to be solvable by eyeballing some graphs (included), the kernal is lost.  This is repeatable for me. Do others experience this problem?

Thank you for your attention.

-------------------

Aside: It would be useful if the output of a search in MaplePrimes could be sorted by date.

 MaplePrimes_Minimization.mw

 

I’m starting a large project in education for which I can see great potential in the use of the “MapleCloud”.  For many of the students, the ability to see information on their phone is a game-changer. Hence while my students do have access to Maple on their computers, they are more willing to check out a worksheet if they can view it in a browser.

Unfortunately, in the little time that I have started using MapleCloud, and sharing my work with others, numerous issues have arisen. Some examples:
  * the file system is too simplistic and can be overwhelmed easily as I add content;
  * the group sharing system is too limited – one must log on, which is not true for worksheets;
  * the display of the mathematics is sufficiently quirky that it is not easy to read;
  * the hiding of input mathematics appears not to work;
  * plots, animations and the output of the Explore function fails too frequently.

So, my questions:
  1) are you using MapleCloud, and
  2) if so, for what?
  3) And if you are using MapleCloud, do you have similar problems?
  4) Have you developed solutions that you would be willing to share.

If there is no interest, I’ll look in another direction. But if there is sufficient interest, I would hope Maplesoft notices and works to correct and improve. Some of it may be my own failing to understand Maple, but instead of overwhelming MaplePrimes with questions, I would rather converse with similar interested folks.

 

1 2 3 4 Page 1 of 4