.


:




:

































 

 

 

 


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

 

>>

=======================================

 

 





:


: 2016-11-02; !; : 389 |


:

:

, , 1:10
==> ...

1682 - | 1611 -


© 2015-2024 lektsii.org - -

: 0.013 .