MATLAB Function Reference    

Check file out of source control system

Graphical Interface

As an alternative to the checkout function, use Source Control Check Out in the Editor, Simulink, or Stateflow File menu.



checkout('filename') checks out the file named filename from the source control system. filename must be the full pathname for the file. The file can be open or closed when you use checkout.

checkout({'filename1','filename2','filename3', ...}) checks out the files named filename1 through filenamen from the source control system. Use the full pathnames for the files. Additional arguments apply to all files checked out.

checkout('filename','option','value', ...) provides additional checkout options. The option and value arguments are shown in the following table.

option Argument
value Argument
When set to on, the checkout is forced, even if you already have the file checked out. This is effectively an undocheckout followed by a checkout. When force is set to off, you can't check out the file if you already have it checked out.
'off' (default)
When set to on, the checkout gets the file, allows you to write to it, and locks the file so that access to the file for others is read only. When set to off, the checkout gets a read-only version of the file, allowing another user to check out the file for updating. With lock set to off, you don't have to check in a file after checking it out.
'on' (default)
Checks out the specified revision of the file.

If you end the MATLAB session, the file remains checked out. You can check in the file from within MATLAB during a later session, or directly from your source control system.


Check out a File


checks out the file /matlab/mymfiles/clock.m from the source control system.

Check out Multiple Files


checks out /matlab/mymfiles/clock.m and
/matlab/mymfiles/calendar.m from the source control system.

Force a Checkout, Even If File Is Already Checked out


checks out /matlab/mymfiles/clock.m even if clock.m is already checked out to you.

Check out Specified Revision of File


checks out revision 1.1 of clock.m.

See Also

checkin, cmopts, undocheckout

  checkin chol