Main Content
Create Runnable Examples Using the Live Editor
In the Live Editor, you can create documentation for your code that includes runnable code examples. To allow your users to experiment with different inputs to your code, include interactive controls in the examples. You can then distribute the documentation with your code to help make your code more useable.
This example uses formatted text, equations, and runnable code to document the sample function estimatePanelOutput
. The sample documentation includes runnable examples with edit fields and a slider that allow users of the function to experiment with different function inputs.
To view and interact with the controls in the sample documentation, open this example in MATLAB®.