SUNY Geneseo Department of Mathematics
Friday, April 28
Math 230 02
Spring 2017
Prof. Doug Baldwin
The Provost’s Technology Advisory Committee is interested in students’ experiences with online courses, whether as a taker of them or as a non-taker, and whether from Geneseo or other schools. You’re likely to get a request to fill out a survey on this subject. Please do so if you get the request.
Monday, May 8, 8:00 AM.
Comprehensive, but emphasizing material since second hour exam (e.g., vectorization, strings, cell arrays, etc.).
Designed for around 1 1/2 hours, you’ll have 2 1/2.
There may be one closed-book question, but the rest will be open-references and open-computer (but closed-person) as in the past.
Rules and format otherwise similar to hour exams, especially open-references rule.
Sample exam in “Final Materials” folder under “Files” in Canvas.
I’ll bring donuts and cider.
5 (!) responses as of last night.
Section 4.12
What’s the point? Why would you want to load or save files? Mainly in order to save “state” (i.e., values of variables) that needs to be used in another Matlab session but that takes a long time to build up. It’s better to save this state the first time you create it and restore it when you need it later than to have to rebuild it every time you need it.
What did the reading have to say about doing it?
save( 'filename' )
function saves the workspace.
load( 'filename' )
reads data back from a file, which must already exist and
have a “.mat” extensionreadtable
to import an Excel spreadsheet.There’s a Matlab function that “plays” a game of Mad Libs, and two sample Mad Libs, in the “Lab Files” folder of our “Files” area in Canvas. In particular...
Download these files to your computer.
Looking at the comments in play2.m, figure out how a Mad Lib is represented.
Matlab has built-in types for things like numbers, matrices, cell arrays, strings, etc. But most large programs involve things that conceptually are not any of the built-in Matlab types. For example, there is no “Mad Lib” or “Eliza dialog” type, yet you are working with programs that deal with those things. “Representation” is about figuring out how to use Matlab types to capture the more abstract things a program “really” works on.
More on representation and programming.
For Monday, see if you can put into words how the Mad Lib player uses Matlab data types to represent a Mad Lib.