concept-collection / jupyterlite-numbl-kernel
add numbl link
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 2c57b1151d5e parent 9391828 Browse files
1 changed file+64−11
demo/content/01-intro.ipynbmodified+64−11View file
@@ -4,55 +4,108 @@
44 "cell_type": "markdown",
55 "id": "in-0",
66 "metadata": {},
7- "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."
7+ "source": [
8+ "# numbl in the browser\n",
9+ "\n",
10+ "This is **numbl** (https://numbl.org) running as a JupyterLite kernel: MATLAB-syntax numerical\n",
11+ "computing that executes entirely in your browser tab. There is no server, no\n",
12+ "kernel process, and nothing to install.\n",
13+ "\n",
14+ "Run each cell with **Shift+Enter**. Variables persist from one cell to the\n",
15+ "next, just like a MATLAB session."
16+ ]
817 },
918 {
1019 "cell_type": "markdown",
1120 "id": "in-1",
1221 "metadata": {},
13- "source": "## Compute with matrices"
22+ "source": [
23+ "## Compute with matrices"
24+ ]
1425 },
1526 {
1627 "cell_type": "code",
28+ "execution_count": null,
1729 "id": "in-2",
1830 "metadata": {},
19- "execution_count": null,
2031 "outputs": [],
21- "source": "A = magic(4)\nb = (1:4)';\nx = A \\ b;\nfprintf('solved a 4x4 system, residual = %.2e\\n', norm(A * x - b));"
32+ "source": [
33+ "A = magic(4)\n",
34+ "b = (1:4)';\n",
35+ "x = A \\ b;\n",
36+ "fprintf('solved a 4x4 system, residual = %.2e\\n', norm(A * x - b));"
37+ ]
2238 },
2339 {
2440 "cell_type": "markdown",
2541 "id": "in-3",
2642 "metadata": {},
27- "source": "## Plot, right in the notebook"
43+ "source": [
44+ "## Plot, right in the notebook"
45+ ]
2846 },
2947 {
3048 "cell_type": "code",
49+ "execution_count": null,
3150 "id": "in-4",
3251 "metadata": {},
33- "execution_count": null,
3452 "outputs": [],
35- "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');"
53+ "source": [
54+ "x = linspace(0, 2 * pi, 400);\n",
55+ "plot(x, sin(x), 'b-');\n",
56+ "hold on;\n",
57+ "plot(x, sin(2 * x), 'r--');\n",
58+ "hold off;\n",
59+ "legend('sin(x)', 'sin(2x)');\n",
60+ "title('plotting works client-side');\n",
61+ "xlabel('x'); ylabel('y');"
62+ ]
3663 },
3764 {
3865 "cell_type": "markdown",
3966 "id": "in-5",
4067 "metadata": {},
41- "source": "## 3-D figures are interactive (drag to rotate)"
68+ "source": [
69+ "## 3-D figures are interactive (drag to rotate)"
70+ ]
4271 },
4372 {
4473 "cell_type": "code",
74+ "execution_count": null,
4575 "id": "in-6",
4676 "metadata": {},
47- "execution_count": null,
4877 "outputs": [],
49- "source": "surf(peaks(40));\ntitle('peaks');"
78+ "source": [
79+ "surf(peaks(40));\n",
80+ "title('peaks');"
81+ ]
5082 },
5183 {
5284 "cell_type": "markdown",
5385 "id": "in-7",
5486 "metadata": {},
55- "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)"
87+ "source": [
88+ "## What's in this demo\n",
89+ "\n",
90+ "A guided tour of the language:\n",
91+ "\n",
92+ "1. [Data types and operators](./02-data-types-and-operators.ipynb)\n",
93+ "2. [Matrices and indexing](./03-matrices-and-indexing.ipynb)\n",
94+ "3. [Control flow and functions](./04-control-flow-and-functions.ipynb)\n",
95+ "4. [Linear algebra](./05-linear-algebra.ipynb)\n",
96+ "5. [Data structures and strings](./06-data-structures-and-strings.ipynb)\n",
97+ "6. [Numerical methods](./07-numerical-methods.ipynb)\n",
98+ "7. [Plotting gallery](./08-plotting.ipynb)\n",
99+ "\n",
100+ "Advanced MATLAB features:\n",
101+ "\n",
102+ "8. [Classes and object-oriented programming](./09-classes-and-oop.ipynb)\n",
103+ "9. [Namespaces and packages](./10-namespaces-and-packages.ipynb)\n",
104+ "\n",
105+ "And finally:\n",
106+ "\n",
107+ "10. [Installing packages with mip](./11-mip-packages.ipynb)"
108+ ]
56109 }
57110 ],
58111 "metadata": {