Main Content

matlabdrive

Root folder of MATLAB Drive

Since R2021a

    Description

    example

    M = matlabdrive returns the path to the folder that contains the content of your MATLAB® Drive™.

    You can run matlabdrive from your desktop or from other MATLAB environments such as MATLAB Online™. On desktop systems, you must have MATLAB Drive Connector installed. If MATLAB is unable to find the MATLAB Drive folder, matlabdrive returns an error.

    Examples

    collapse all

    Get the location of your MATLAB Drive folder on a desktop system with MATLAB Drive Connector installed.

    md = matlabdrive
    md = 
        'C:\Users\username\MATLAB Drive'

    If you know where a file is within your MATLAB Drive folder, you can also use matlabdrive to get the full path to the file.

    md = fullfile(matlabdrive,'myfolder','myfunction.m')
    md = 
        'C:\Users\username\MATLAB Drive\myfolder\myfunction.m'

    Set the current folder to your MATLAB Drive folder.

    cd(matlabdrive)

    Tips

    • On a desktop system, MATLAB Drive Connector must be running and properly configured. Otherwise, matlabdrive returns an error. For more information, see Use MATLAB Drive Connector to Manage Your Files.

    • On a MATLAB Parallel Server™ cluster provisioned through Cloud Center, the cluster must be configured as a personal cluster with a dedicated head node. Otherwise, matlabdrive returns an error.

    Version History

    Introduced in R2021a