close - Close file in IDE window

Syntax

close (id,'filename','filetype')

Description

close (id,'filename','filetype') closes the file named 'filename' in the active project in the id IDE window. If filename is not an open file in the IDE, MATLAB® returns a warning message. When you enter null value [] for filename, close closes the current active file in the IDE. filename must match exactly the name of the file to close. If you enter all for the filename, close closes all files in the project that are of the type specified by filetype.

The parameter 'filetype' is optional, with the default value of 'text'. Allowed 'filetype' strings are 'project', 'projectgroup', 'text', and 'workspace'. Here are some examples of close operation commands. In these examples, id is a ghsmulti object handle to the IDE.

close(id,'all','project') — Closes all open project files

close(id,'my.gpj','project') — Closes the open project my.gpj

close(id,[],'project') — Closes the active open project

close(id,'all','projectgroup') — Close all open project groups.

close(id,'myg.dpg','projectgroup') — Closes the project group: myg.dpg

close(id,[],'projectgroup') — Closes the active project group

close(id,'all','text') — Close all text files

close(id,'text.c','text') — Closes the text file text.c

close(id,[],'text') — Closes the active text file

See Also

add

open

  


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