Приложение 1. Help команд Матлаба open и load
>> help open
OPEN Open files by extension.
OPEN NAME where NAME must contain a string, does different things
depending on the type of the object named by that string:
ОТКРЫТЫЕ Открытые файлы по расширениям.
ОТКРЫТОЕ ИМЯ где ИМЯ должно содержать строку, делает другие вещи в зависимости от типа объекта названного этой строкой:
Type Action
---- ------
variable open named array in Array Editor % открывать названный массив в Редакторе Массива
.mat file open MAT file; store variables in a structure in the workspace % сохранять переменные в структуре рабочей области
.fig file open figure in Handle Graphics
.m file open M-file in M-file Editor
.mdl file open model in SIMULINK
.html file open HTML document in Help Browser
.p file if NAME resolves to a P-file and NAME did not end with a .p
extension, attempts to open matching M-file; if NAME did end
with a .p extension displays an error
OPEN works similar to LOAD in the way it searches for files. % ОТКРЫВАТЬ работает аналогично ЗАГРУзке указанного в пути файла
If NAME exists on MATLAB path, open file returned by WHICH.
If NAME exists on file system, open file named NAME.
Examples:
open('handel') First looks for a variable named handel, and then %сначала просматривается переменная с именем handel, looks on the path for a file named handel.mdl or handel.m. % затем ищется путь к названному файлу с расширением mdl или m. Error if it can't find any of these. % Если ничего такого не найдено, вырабатывается ошибка.
open('handel.mat') Error if handle.mat is not on path. %Ошибка, если адрес не указан в пути
open('d:\temp\data.mat') Error if data.mat is not in d:\temp.
OPEN is user-extensible. To open a file with the extension ".XXX", %Команда Open открывает файл с обязательно указанным расширением
OPEN calls the helper function OPENXXX, that is, a function
named 'OPEN', with the file extension appended.
For example,
open('foo.m') calls openm('foo.m')
open foo.m calls openm('foo.m')
open myfigure.fig calls openfig('myfigure.fig')
You can create your own OPENXXX functions to set up handlers
for new file types. OPEN will call whatever OPENXXX function
it finds on the path.
See also SAVEAS, WHICH, LOAD, UIOPEN, UILOAD, FILEFORMATS, PATH.
Overloaded methods
help scribehandle/open.m
help serial/open.m
help rtdxhelp/open.m
help ccshelp/open.m
help instrument/open.m
help vrworld/open.m
>>
==========================================
>> help load
LOAD Load workspace variables from disk. %Загружает область переменных с диска
LOAD FILENAME retrieves all variables from a file given a full pathname
or a MATLABPATH relative partial pathname (see PARTIALPATH). If FILENAME
has no extension LOAD looks for FILENAME and FILENAME.mat and treats it
as a binary "MAT-file". If FILENAME has an extension other than .mat, it
is treated as ASCII. %Если расширение файла отлично от .mat, он рассматривается как ASCII.
LOAD, by itself, uses the binary "MAT-file" named 'matlab.mat'. It is
an error if 'matlab.mat' is not found.
LOAD FILENAME X loads only X.
LOAD FILENAME X Y Z ... loads just the specified variables. The
wildcard '*' loads variables that match a pattern (MAT-file only).
LOAD -ASCII FILENAME or LOAD -MAT FILENAME forces LOAD to treat the file
as either an ASCII file or a MAT file regardless of file extension.
With -ASCII, LOAD will error if the file is not numeric text. При указании ASCII возникнет ошибка, если файл не являетс числовым текстом.
With -MAT, LOAD will error if the file is not a MAT file generated by SAVE -MAT.
If FILENAME is a MAT file, requested variables from FILENAME are created
in the workspace. If FILENAME is not a MAT file, a double precision array
is created with name based on FILENAME. Leading underscores or digits in
FILENAME are replaced with X. Other non-alpha chars in FILENAME are
replaced with underscores.
S = LOAD(...) returns the contents of FILENAME in variable S. If
FILENAME is a MAT file, S is a struct containing fields matching the
variables retrieved. If FILENAME is an ASCII file, S is a double
precision array.
Use the functional form of LOAD, such as LOAD('filename'), when the
file name is stored in a string, when an output argument is requested,
or if FILENAME contains spaces.
See also SAVE, WHOS, UILOAD, SPCONVERT, PARTIALPATH, IOFUN, FILEFORMATS.
Overloaded methods
help activex/load.m
Overloaded methods
help ccshelp/load.m
help mdevproject/load.m
help cgproject/load.m
help xpc/load.m
>>
=======================================