Learn together matlab-matlab study notes 4
_3 data import and export import and export spreadsheets
Find useful, welcome to discuss mutual learning together - Follow Me
Reference books
"matlab programming and integrated application" Zhang Defeng waiting to thank Zhang's books, so I appreciate the convenience of matlab
MATLAB support for Microsoft
Import / export graphics files
xlswrite function
Use xlswrite function matrix exported to Excel table, such as d mixing alphanumeric data matrix
In the working folder will generate a file named tempdat.xls, and you can see after opening
xlsread function
xlwread Excle function to import the data file into MATLAB workspace. For example, the data file into the above-XLS introducing:- Represents read data from the called 'Tempratures'sheet called' tempdata.xls' of the file, or reading data from the first sheet.
>> d1=xlsread('tempdata.xls','Tempratures')
d1 =
12 98
13 99
14 97
- Together with the read out data, text, and text data, and
>> [e,f,g]=xlsread('tempdata.xls','Tempratures')
e =
12 98
13 99
14 97
f =
'Time' 'Temp'
'' ''
'' ''
'' ''
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
g =
'Time' 'Temp'
[ 12] [ 98]
[ 13] [ 99]
[ 14] [ 97]
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'
'Time' 'Temp'