Main Content

matlabdrive

Root folder of MATLAB Drive

    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.

    path = matlabdrive
    path = 
        '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.

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

    Tips

    • On a desktop system, MATLAB Drive Connector must be running and properly configured. Otherwise, matlabdrive returns an error. For more information, see Install MATLAB Drive Connector (MATLAB Drive) and Start and Stop MATLAB Drive Connector (MATLAB Drive).

    • 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.

    Introduced in R2021a