Attention

This is no longer maintained and has been superseded by datajoint-company/datajoint-docs. Please file new issues there (or help contribute!). We are currently migrating and generating new content until December 2022 after which we’ll be decomissioning https://docs.datajoint.org and https://tutorials.datajoint.org in favor of https://datajoint.com/docs/.

Loading Classes

Creating a virtual class

To facilitate working with existing pipelines, DataJoint MATLAB creates a TableAccessor property in each schema object. The TableAccessor property, a virtual class generator, is available as schema.v, and allows listing and querying of the tables defined on the server without needing to create the MATLAB table definitions locally. For example, creating a scratch experiment schema package and querying an existing my_experiment.Session table on the server can be done as follows:

dj.createSchema('experiment', '/scratch', 'my_experiment')
addpath('/scratch')
experiment_schema = experiment.getSchema();
experiment_schema.v.Session() & 'session_id=1234';

Note

You can view the available tables in a schema by using tab completion on the schema.v property.

Talk to the Community