{ "cells": [ { "cell_type": "markdown", "id": "in-0", "metadata": {}, "source": "# numbl in the browser\n\nThis is **numbl** running as a JupyterLite kernel: MATLAB-syntax numerical\ncomputing that executes entirely in your browser tab. There is no server, no\nkernel process, and nothing to install.\n\nRun each cell with **Shift+Enter**. Variables persist from one cell to the\nnext, just like a MATLAB session." }, { "cell_type": "markdown", "id": "in-1", "metadata": {}, "source": "## Compute with matrices" }, { "cell_type": "code", "id": "in-2", "metadata": {}, "execution_count": null, "outputs": [], "source": "A = magic(4)\nb = (1:4)';\nx = A \\ b;\nfprintf('solved a 4x4 system, residual = %.2e\\n', norm(A * x - b));" }, { "cell_type": "markdown", "id": "in-3", "metadata": {}, "source": "## Plot, right in the notebook" }, { "cell_type": "code", "id": "in-4", "metadata": {}, "execution_count": null, "outputs": [], "source": "x = linspace(0, 2 * pi, 400);\nplot(x, sin(x), 'b-');\nhold on;\nplot(x, sin(2 * x), 'r--');\nhold off;\nlegend('sin(x)', 'sin(2x)');\ntitle('plotting works client-side');\nxlabel('x'); ylabel('y');" }, { "cell_type": "markdown", "id": "in-5", "metadata": {}, "source": "## 3-D figures are interactive (drag to rotate)" }, { "cell_type": "code", "id": "in-6", "metadata": {}, "execution_count": null, "outputs": [], "source": "surf(peaks(40));\ntitle('peaks');" }, { "cell_type": "markdown", "id": "in-7", "metadata": {}, "source": "## What's in this demo\n\nA guided tour of the language:\n\n1. [Data types and operators](./02-data-types-and-operators.ipynb)\n2. [Matrices and indexing](./03-matrices-and-indexing.ipynb)\n3. [Control flow and functions](./04-control-flow-and-functions.ipynb)\n4. [Linear algebra](./05-linear-algebra.ipynb)\n5. [Data structures and strings](./06-data-structures-and-strings.ipynb)\n6. [Numerical methods](./07-numerical-methods.ipynb)\n7. [Plotting gallery](./08-plotting.ipynb)\n\nAdvanced MATLAB features:\n\n8. [Classes and object-oriented programming](./09-classes-and-oop.ipynb)\n9. [Namespaces and packages](./10-namespaces-and-packages.ipynb)\n\nAnd finally:\n\n10. [Installing packages with mip](./11-mip-packages.ipynb)" } ], "metadata": { "kernelspec": { "display_name": "numbl (MATLAB syntax)", "language": "numbl", "name": "numbl" }, "language_info": { "codemirror_mode": "octave", "file_extension": ".m", "mimetype": "text/x-octave", "name": "numbl", "nbconvert_exporter": "script", "pygments_lexer": "matlab" } }, "nbformat": 4, "nbformat_minor": 5 }