do you want to create (a file, a text box in a graphic, code)? Knowing this will help me give you the right instructions. Create and Format Text - MATLAB & Simulink - MathWorks
Right-click on your desktop or in a folder, select New , and then choose Text Document .
You can create an empty text element using this.Factory.NewText() or text with content using this.Factory.NewText("ptxt", "Text Content") .
Based on your request, it seems you are trying to create a text file or text content. Here are the most common ways to achieve this depending on your context: