Scot Gould

Scot Gould

1039 Reputation

15 Badges

12 years, 94 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 answers submitted by Scot Gould

RandomVector in the LinearAlgebra package is the fastest way to generate a large number of value. Here I set the data to be of type float so that it is hardware float. (acer can correct me if this is wrong). The use of the "elementwise" operator ~ allows one to operate on each element in a vector just like you are used to in MATLAB. 

restart;
randomize():  # to set the seed to a random value
N := 1000:
v := LinearAlgebra:-RandomVector(N, generator = 0 .. 6.00000, datatype = float):
y := Statistics:-CumulativeSum(  2 * (v  <=~  3)  -~ 1 ) :
plots:-listplot(y);

 

@Andiguys I did not go over your problem. Instead, here is an example of how to make a plot similar to the plot you showed. multi-data_plot.mw

restart

 

with(Student:-VectorCalculus)

 

One does not need the vector sign. However, I have found for pedagogical reasons, and the desires of the students, I use it.

 

`#mover(mi("a"),mo("&rarr;"))` := `<,>`(-3, 1); `#mover(mi("b"),mo("&rarr;"))` := `<,>`(4, 2)

 

Asking for the length of each vector is now easy and readable.

a := LinearAlgebra[Norm](`#mover(mi("a"),mo("&rarr;"))`); b := LinearAlgebra[Norm](`#mover(mi("b"),mo("&rarr;"))`)

10^(1/2)

 

2*5^(1/2)

(1)

And the midpoint function also easy to read.

"Midpoint(x, y) := 1/(2)*(x+y):"

`#mover(mi("c"),mo("&rarr;"))` := Midpoint(`#mover(mi("a"),mo("&rarr;"))`, `#mover(mi("b"),mo("&rarr;"))`)

Vector(2, {(1) = 1/2, (2) = 3/2})

(2)

For fun, draw the line between the two vectors

 

"y(x) := ((b-a)[2])/((b-a)[1])*x + ((a[2]*b[1]-a[1]*b[2])/(b[1]-a[1])):"

 

While one could use PlotVector, personally, I prefer to stick with arrow.

tset := Typesetting:-Typeset; plots:-display(plot(y(x), x = `#mover(mi("a"),mo("&rarr;"))`[1] .. `#mover(mi("b"),mo("&rarr;"))`[1], color = "DarkBlue"), plots:-arrow(`#mover(mi("a"),mo("&rarr;"))`, legend = tset(`#mover(mi("a"),mo("&rarr;"))`), color = blue, width = .1), plots:-arrow(`#mover(mi("b"),mo("&rarr;"))`, legend = tset(`#mover(mi("b"),mo("&rarr;"))`), color = "Magenta", width = .1), plots:-arrow(`#mover(mi("c"),mo("&rarr;"))`, legend = tset(`#mover(mi("c"),mo("&rarr;"))`), color = "xkcd:green", width = .1))

 
 

NULL

Download VectorCalculus_Distance_and_Midpoint.mw

You might want to play with

interface(rtablesize = [n_rows, n_cols])

However, if you have a vector with 1 row, it appears that the number of entries shown is n_rows*n_cols. 

One can add a modification to the maple.ini file. 

While plotting an Array of plots works, I have never liked the fact that the plots are not centered in the region. For a quick solution, along with having the plots centered and the size controlled, consider DocumentTools:-Tabulate. 

display_vs_Tabulate_an_array_of_plots.mw

 

This is a completely different approach for a present - DocumentTools:-Tabulate.  It won't align the numbers with the precision of the print procedure. However, it is pretty. I wanted to look more at Tabulate, and you provided me with a good opportunity to play with it. (And this problem allows me to reinforce the simplicity and flexibility of using the option: output = listprocedure. 😁😉 )  

 

MaplePrimes_SIR_Model_with_Table.mw

@frankmath@Ronan

1) Create a worksheet with the styles that you want. The one I use is attached. 

2) Select Format -> Set Style Management to open a window.

3) In Style Set Operations, select "Export Style Set" and put it in a directory that you like. I have made a separate directory for the different styles that I use. I do not use the Maple default directory. 

4) In "Current Style Set," highlight "User-defined Style Set," and then browse to the appropriate directory and highlight this file. 

If you open another worksheet, the user-defined style set should be applied. 

Gould_Style_Template.mw

@paulmcquad This video shows an alternative way to put characters above other characters using the Maple interface. It is for making a vector sign over a variable, but a bar is just a vector sign without the > character. 

However, be careful.  Maple does not view a defined variable with a bar over it as the complex conjugate of the variable unless you tell it. 

You might also find this video on complex numbers useful. There is an associated document

I needed to test some other parts of Maple, and your problem came up as a good example. It doesn't go any further than what @rcorless wrote, but if you find the work useful, here it is. 

ODE_with_non-integer_component.mw

Your previous question was deleted even though I believe you responded to my suggestion. Posting again. MaplePrimes_question_visualization_of_animation.mw

I would try Explore the animation. 

Run the Explore and click on the animation to run.

 visualization.mw

I agree with Carl. Your pizza will be burned if you try to have it reach 300 F. Here are some common temperatures used. Turkey = 165, eye of round = 145 F.

Two basic recommendations:

1) Make a function with the parameters that could be modified. 

2) Make an Explore app to help aid in visualization. 

That is my experience. This is how I would cover Newton's model for cooling. 

MaplePrimes_Newton_Cooling.mw

See the video and example maple.ini file in the video description :

https://youtu.be/e4HR_Wmmr1E?si=NduEEQOGiz7e9IvT

I include a similar option in my maple.ini file. 

@lemelinm

Hmm, I appear to have missed your question. When a question is posted to one of my videos, I am (usually) notified immediately. Sorry to miss yours. 

Text version of the answer - there is no trick. Use the shortcut keys. Maple Help

See "Overscript" operation. 

Or watch this short video

Showing folks how to add the vector sign may be the most frequent request I receive.

1 2 3 4 5 6 7 Page 2 of 9