Can we implement random forest using fitctree in matlab?
I would highly recommend doing some research into the architecture of random forests.  There are many sites that provide in depth tutorials on RFs (Implementation in Python).

Quick  explanation: take your dataset, bootstrap the samples and apply a decision tree. Within your trees, you  want to randomly sample the features at each split. You should not have to build your own RF using fitctree however.  You don't want to control each individual tree in the forest. This introduces bias, and the point of the RF is that by bagging many trees, you remove the risk of overfitting. 

Define your hyperparameters and let the algorithm do it's thing.  Carefully cross-validate to ensure you are not under-fitting.