Install and Connect¶
Download the DataJoint MATLAB Toolbox from the MATLAB Central FileExchange.
DataJoint.mltbxand follow installation instructions.
After installation, verify from MATLAB that you have the latest version of DataJoint (3.0.0 or above):
>> dj.version DataJoint version 3.0.0
At the MATLAB command prompt, assign the environment variables with the database credentials. For example, if you are connection to the server
haha not my real password, execute the following commands:
setenv DJ_USER alice setenv DJ_HOST alicelab.datajoint.io setenv DJ_PASS 'haha not my real password'
You will need to execute these commands at the beginning of each DataJoint work session. To automate this process, you might like to use the startup.m script.
However, be careful not to share this file or commit it to a public directory (a common mistake), as it contains a your login credentials in plain text.
If you are not sure, it is better not to set
DJ_PASS, in which case DataJoint will prompt to enter the password when connecting to the database.
To change the database password, use the following command
And update your credentials in your startup script for the next session.