Scot Gould

Scot Gould

1039 Reputation

15 Badges

12 years, 205 days
Claremont McKenna, Pitzer, Scripps College
Professor of Physics
Upland, California, United States
Dr. Scot Gould is a professor of physics at Claremont McKenna, Pitzer, and 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 studies and experiments using scanning probe microscopes, particularly those involving natural fibers such as spider silk. More recently, he was involved in developing and sustaining AISS. This full-year multi-unit, non-traditional, interdisciplinary undergraduate science education course integrated topics from biology, chemistry, physics, mathematics, and computer science. His current interest is integrating computational topics into the physics curriculum. He teaches the use of Maple's computer algebraic and numerical systems to assist students in modeling and visualizing physical and biological systems. His Dirac-notation-based quantum mechanics course is taught solely through Maple.

MaplePrimes Activity


These are replies submitted by Scot Gould

As @Carl Love points out, in the first case, there is no pre-mature evaluation in the first plot because it is a seq procedure, while there is a pre-mature evaluation in the 2nd plot. However, a new issue arises in the second plot if you try to get around the pre-mature evaluation problem. The points selected by the plot procedure are not integers, as they are in the sequence generated for the first plot. Hence, the following call fails to generate a plot.

plot('t mod 10', t = 1..100)

If one wants to plot t mod 10, one must make sure t is an integer. Even though the following won't produce the first plot, at least it will work. 

plot( ' round(t) mod 10 ', t = 1..100 );

I'm mentioning this other issue since it came up with a colleague of mine just a day ago. 

@Paras31 Sorry, your question made me think about lots of ideas which caused me to go in a completely different direction. since my goals are physics related. My bad.

As for trying to answer your question, I prefer to use DEplot. See attached.

And, as for using Maple in your lesson: Watch out.  Once you start using it, you may find it addicting. 😉

 

MaplePrimes_ODE_equilibrium_points.mws

@nm You are correct about version 2024.1. It works properly in version 2023.2. In testing your example, it appears I unintentionally switched between versions.

To be frank, I have found version 2024 fails to execute more often than version 2023, and it provides no additional features. However, 2023 was an improvement over 2022.  

@zenterix but unlike most procedures which fail if you pass it something other than an option, simply accepts your statement without an error. They are useless relationships.

I don't think so. However, I actually like to use a hybrid document/worksheet state where the file is in worksheet mode, but by hitting F9, the boundaries of the execution and text groups disappear. It then looks like a semi-document mode. Very readable.  (Alternative: View->Show/Hide->Execution Group.) 

Try the procedure smartplot(sol), not plot(sol). It appears to work. 

@Nicole Sharp IMO, every constant in the Units packages should not be a type of indexed variable name but an atomic variable, i.e., g__n and m__n. It is more logical. And by being an indexed variable, should one assign n a value, g[n] cannot be obtained without the use of the unevaluate characters. 

g__n := Constant('g[n]')

Sure, the 'unevaluate' characters are good practice, but they contribute an additional layer of complexity to the worksheet. 

Personally, when possible, I avoid the Units package. And I never teach with them. They can be useful for working across measurement systems. However, I suspect they generate the highest number of questions on MaplePrimes per use. For a new user of Maple, I have found they add a level of complexity that detracts the user from concepts they should be trying to understand.

@dharr Upvote for multiple reasons:

* even if minimize does work, such as in 2024.1, the Optimization package procedure is two orders of magnitude faster.

* it is always best to plot the function just to make sure the procedure picked out the global minimum and not a local one. 

@dharr, I need to remember the "create array" procedure. That said, I'm not pleased with either solution. Both solutions appear to me to be a kludge. Why did the Array accept the Vectors as you entered it, but Matrix, which I thought was a restricted type of Array, not? 

@C_R 

restart

vectors1 := [seq(`<,>`(i, i+1, i+2), i = 1 .. 3)]; vectors2 := [seq(`<,>`(i, 2*i, 3*i), i = 1 .. 3)]

 

arrowList_DoubleBrackets := Matrix(3, 2, [seq([[vectors1[i]], [vectors2[i]]], i = 1 .. 3)])

Matrix(%id = 36893489668996764844)

(1)

I think we have a case of premature evaluation when we remove the brackets

arrowList_SingleBrackets := Matrix(3, 2, [seq([vectors1[i], vectors2[i]], i = 1 .. 3)])

Error, (in Matrix) initializer defines more rows (9) than row dimension parameter specifies (3)

 

 

Hence no evaluation

arrowList_SingleBrackets := Matrix(3, 2, [seq(['vectors1'[i], 'vectors2'[i]], i = 1 .. 3)]); arrowList_SingleBrackets[3, 2]

Vector[column](%id = 36893489668996774476)

(2)
 

NULL

Download MaplePrimes_Matrix_of_Vectors.mw

@C_R It fails for me if I don't use the not-evaluate quotes. 

@mmcdara Thank you for writing out a customized version of the H-type error bars. The penultimate example is perfect. (The final example is beautiful.) 

Sadly, your answer reinforces my belief that ErrorPlot cannot generate the traditional error bar in science through an option. Very few folks have the skill and experience that you possess, nor the time, to write code using CURVES, POINT and PLOT. Maybe a simple procedure could be added to the Maple Applications Center. (Maybe a summer intern can add it to either ScatterPlot.)

@nmacsai Another option is the plot option, "axes = frame".

@acer 

Thank you for the explanation of what is going on in the background. I believe I understand why Export failed, but plotsetup succeeded. 

And doing another eyeball test, I'm in agreement: PNG > GIF >> JPEG. This question generated a greater positive outcome than I expected. 

@mmcdara 

1) The key appears to be using plotsetup vs. Export. Appreciated.

2) Thank you for the suggestion of GIF over JPEG. I agree; if I zoom in quite a bit, the JPEG does show more fuzz than the GIF. 

Sadly, both formats change the tickmark font. 

First 8 9 10 11 12 13 14 Last Page 10 of 31