Scot Gould

## 707 Reputation

11 years, 112 days
Claremont McKenna, Pitzer, Scripps College
Professor of Physics
Upland, California, United States
Dr. Scot Gould is a professor of physics in the W.M. Keck Science Department of 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.

## Not reproducible using 2D input and outp...

However, I cannot tell if we are using the same 2024.0 build. Mine is 1767880. No change in matrix scrolling.

To @janhard@mmcdara and @acer - thank you for your contributions to this important topic.

While even I recognize "simplify" has improved during the past two iterations of Maple, this post pushes the project forward. A robust "simplify" procedure has significant pedagogical value.

## see help...

@Ronan, I believe they are one and the same. See the help page.

## Upvote for using ifelse...

@dharr Upvote for using ifelse and not the often mistyped `if` phrase.

Just an FYI, for efficiency considerations, the for loop can be reduced to a seq procedure:

`A := [ seq( Matrix(n,(i,j) -> f(i,j)), n = 1..4) ]`

where f(i, j) is the function defining each element.  Your mileage may vary.

## Yep......

@MapleIsHard And that is what one generates late at night on minimal sleep. My hope was to get you started. Clearly, you now have a multitude of Maple solutions. I hope you found them mathematically and conceptually educational.

## An alternative approach...

As a like-minded educator, I thought you might be interested in an alternative approach to this problem. It simplifies some of your work and provides the code to create a "What If" app through the Explore procedure. IMO, the Explore procedure is the most pedagogically valuable Maple procedure for complex problems like yours.

SIR_simple_vaccination_example_suggestions.mw

## Application center...

@mr_picky  Have you looked into the application center?

https://www.maplesoft.com/Applications/

It is not specific, but you might find it handy for other projects.

## Big green up arrow...

@mr_picky To upload your worksheet, hit reply and then hit the big green up arrow. Select your file and insert it as a file or as content.

It is very difficult to work with the worksheet printed the way it is above.

@mr_picky, I just want to point out that sum is a great procedure. And, it works with the Sigma symbol which I prefer to use. (I swear, it seems like the folks at Maplesoft seem to make it smarter with every release, even if they say it does not.)

However, sum is designed for symbolic summations. Here, you want to add values. Hence, this is when you need to use the add procedure.

https://www.maplesoft.com/support/help/maple/view.aspx?path=sum

## Respectfully disagree...

@acer As I said, there are multiple ways. I prefer to comment while coding using the word Matrix (or Vector or Array).

Beauty is in the eye of the beholder

## Warning...

If you want to copy matrices, do not simply write

`B := A;`

Since matrices are "mutable" rectangular tables (rtables), Matrix B will reference A. Hence, any changes to A will be observed in B. There are several ways to make a full copy, but IMO, the most readable is to create a Matrix out of A:

`B := Matrix(A);`

## Reference videos and documents...

Since you are a new user, you might find the series on learning Maple that I put together for the new users I teach. In most videos, I type the commands or click the palettes instead of just presenting the output. The video on creating vectors is here, and the one on creating matrices and matrix arithmetic is here.  (I try to limit all videos to 12 minutes. One of them got away from me. ðŸ˜• )  Each video comes with an associated document if you prefer to read than watch.

The entire series can be found on the website: gould.prof/learning-maple.

## I saw that...

@dharr I saw that procedure name, but I assumed that was a typo by the OP.