How to use the aggregate command with the MongoDB connector in Matlab?

  aggregate, c++, matlab, mongodb, nosql

I have just started using MongoDB with Matlab (R2021b). Currently, I am using the Database Toolbox Interface for MongoDB by MathWorks Computational Finance Team ( with the mongoc class ( to connect to my MongoDB database.

However, after going through the documentation I am unable to find the aggregate method equivalent to the command in MongoDB. Is is possible to run aggregation operations with the other available methods (find, insert, update, remove)? Or am I constrained with the find method for querying?

Any help would be greatly appreciated!

Source: Windows Questions C++