Lecture10 - Lecture 10 Miscellaneous topics Cinna Wu...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 10: Miscellaneous topics Cinna Wu [email protected] Department of Mathematics University of California, Berkeley Math 98 Introduction to MATLAB programming Announcements HW 4 Solutions are up HW 5 (optional if you have passed four assignments) is up. HW 5 must be in to me by Thursday 10/6/11. Put HW in my mailbox on the 9th floor of Evans hall. Labeled C. Wu MAT-Files save save saves the contents of a MATLAB variable to a MAT-file. The file are saved to the current directory (use the dir command to check the current directory). For example, >>x=randn(1,2) >> 0.1253 0.2877 >> save sample x; Example In the following code, use save to save the 20th matrix as mat20. v = zeros(100,1); for i = 1 : 100 A = randn(10,10); v(i) = trace(A); end Using the append option, add a description of the matrix to mat20.mat. MAT-Files load load allows you to load the contents of a MAT-file. For example, >> clear x >> load sample.mat; >> x >> 0.1253 0.2877 Options for load and save save all, save filename x y z, save filename x -append, load filename x Lookup tables...
View Full Document

{[ snackBarMessage ]}

Page1 / 7

Lecture10 - Lecture 10 Miscellaneous topics Cinna Wu...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online