top of page
CPMSE Worked Examples
SNOW
-
Download the code from the following link and open it in Matlab.
-
Execute the function by typing “snow(5)” in the Command Window.
-
Try other numbers and see what this program produces.
-
While I don't expect you to be able to understand this program in detail, it is
useful to try to start thinking of a program as a foreign language. Often it is
possible to understand a foreign language that has common roots to your own
even if you aren't an expert speaker. Try to apply that way of thinking to this
program. Read carefully through the code and see if you can describe how you
think the function kline is producing this result. -
Have one of your other group members come over to your computer and, while
you are not looking, make two changes to your program and save it over the
original version. These changes should be deletion, insertion or alteration to
individual characters. Now run the program. Does it still work? Can you figure
out what they changed and fix it?
bottom of page