1> **Early Stage & Experimental** - This project is in early development and should be considered experimental.
3# numbl Embed Example
5This repository demonstrates how to embed interactive MATLAB scripts in Markdown files using [numbl-embed](https://github.com/flatironinstitute/numbl). When rendered on GitHub Pages, the embedded scripts become editable and executable directly in the browser via [numbl](https://numbl.org).
7## Example
9* **Rendered**: [example1](https://magland.github.io/numbl-embed-example/example1)
10* **Source**: [example1.md](https://raw.githubusercontent.com/magland/numbl-embed-example/refs/heads/main/example1.md)
12```markdown
13<script src="https://numbl.org/numbl-embed.js"></script>
15This demonstrates how to embed numbl in a markdown file that can be rendered on GitHub pages.
17<numbl-embed>
18<iframe width="100%" height="600" frameborder="0"></iframe>
19<script type="text/plain" class="matlab-script">
20% Matrix operations example
21A = [8, 1, 6; 3, 5, 7; 4, 9, 2];
22disp('Matrix A:')
23disp(A)
25disp('Sum of each row:')
26disp(sum(A, 2))
28disp('Sum of each column:')
29disp(sum(A, 1))
30</script>
31</numbl-embed>
32```