Text-only
Table of Contents (
frame
/
no frame
)
(14) Loading and Saving Data
Load and Save Functions
Commands load and save
assume data is stored in a platform-independent binary format
default filename is matlab.mat
file name ends in a .mat extension
read/write binary data files by default
save
save filename
save filename x y z
load filename data*
save filename -ascii
load
load filename
load filename x y z
load filename data*
load filename
Try:
>>clear
a= rand(3,2);
b=ones(3,2);
c = a.^2+b;
save mydata
clear
load mydata
save -ascii mydata_ascii
clear
load mydata_ascii
Loading_and_Saving_Data.src last modified Oct 17, 2007
Introduction
Table of Contents
(
frame
/
no frame
)
Printable
(single file)
© Dartmouth College