Question
Dears, I strongly suspect that my question is rather fundamental and basic and less related to Deep learning but because I wanted to highlight the context hence the title of this thread. Well, this is how I am trying to execute the "Word-By-Word Text Generation Using Deep Learning" example which uses text from Alice in Wonderland. When calling: ds = documentGenerationDatastore(documents); I get the error message: 'documentGenerationDatastore' is used in Word-By-Word Text Generation Using Deep Learning. The above message looks like an affirmative sentence, which of course I can agree with but it is a bit laconic. Does anyone perhaps know what is causing this error?
Expert Answer
John Michell
PhD Expert
Answered Nov 20, 2025
I agree that the error message isn't helpful.
C:\Program Files\MATLAB\R2021a\examples\nnet\main\
or on any system,
fullfile(matlabroot,'examples','nnet','main','documentGenerationDatastore.m')
and while I have the Deep Learning Toolbox and the nnet>main folder, the file is missing (r2021a). The documentation also shows how to create your own custom mini-batch datastore in Develop Custom Mini-Batch Datastore but that's not helpful to understand what should be in documentGenerationDatastore.m.
I'd contact Tech Support using: Contact Us - MATLAB & Simulink
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related deep learning Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →