open - Open specified file

Syntax

open(vd,'filename')
open(…,'filetype')

Description

open(vd,'filename') opens file filename in the IDE. If you specify the file extension in filename, open opens the file of that type. If you omit the file extension from the name, open assumes the file to open is a text file. The following table presents the possible file types and extensions.

File TypeExtensionDescription
texttxt, c, asm, cpp, h, and all file extensions not listed elsewhere in this tableText file
projectdpjVisualDSP++ IDE project
projectgroupdpgProject group in VisualDSP++ IDE project
workspaceNoneWorkspace in VisualDSP++ IDE project

If the file to open does not exist in the current project or directory path, MATLAB returns a warning and returns control to MATLAB.

open(…,'filetype') identifies the type of file to open. This can be useful when your project includes files of different types that have the same name or when you want to open a project, project group, or workspace. Using the input argument filetype overrides the file type defined by the file extension in the file name. The preceding table defines the valid file type extensions.

open(…,timeout) adds the optional parameter timeout that defines how long, in seconds, MATLAB waits for the specified load process to complete. If the time-out period expires before the load process returns a completion message, MATLAB returns an error. Usually the program load process works correctly in spite of the error message.

See Also

cd

dir

load

new

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS