diff --git a/Furuta/Introduction.ipynb b/Furuta/Introduction.ipynb index 253b7e10babd2f556a657ea4d19dd8f5832daf07..d7f2828fe752a362f25eec9eb6842aeb6b9db5ea 100644 --- a/Furuta/Introduction.ipynb +++ b/Furuta/Introduction.ipynb @@ -23,22 +23,14 @@ "source": [ "One useful feature of Jupyter Notebooks is that they allow mixing text (with fancy formatting) and executable code (organized in \"cells\"), and that the results of executing code gets printed.\n", "\n", - "If you click in the below code cell, containing the code `print (\"I can see the output!\")`, and press shift+enter, then you should indeed see the output." + "If you click in the below code cell, containing the code `print (\"I can see the output!\")`, and press shift+enter (or shift+return), then you should indeed see the output." ] }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "I can see the output.\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "print(\"I can see the output.\")" ] @@ -49,14 +41,14 @@ "source": [ "You should now see the text \"I can see the output.\", and the cell should have been give a number which is shown to the left of the cell, telling us that it was the first cell to be executed. If you execute the cell again, it should get the number 2 instead.\n", "\n", - "This notebook uses python as the programming language to execute, but jupyter can handle many other programming languages as well. \n", + "This notebook uses python as the programming language to execute code cells, but jupyter can handle many other programming languages as well. \n", "\n", "Let's define a function in one cell and use it in the next." ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -66,20 +58,9 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.42" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "f(1.2)" ] @@ -88,21 +69,21 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "There are more ways to execute the cells in a notebook than pressing shift+enter, including the buttons just above the notebook, and via the menus at the top, but we will not focus on them now." + "There are more ways to execute the cells in a notebook than pressing shift+enter, including using the buttons in the toolbar just above the notebook, and via the menus at the top, but we will not focus on them now." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "At the bottom left of the screen, there should now be a text saying that we are using a Python 3 kernel, and that the kernel is currently *Idle*. When we run a longer computation, we will see that change to *Busy* instead. There is also a place at the top right where it says that the kernel is Python 3, with a nearby circle. When a computation is running, the circle will be filled.\n", + "At the bottom left of the screen, there should now be a text saying that we are using a Python 3 kernel, and that the kernel is currently *Idle*. When we run a longer computation, we will see that change to *Busy* instead. There is also a place at the top right where it says that the kernel is Python 3, with a nearby circle. While a computation is running, the circle will be filled.\n", "\n", - "Let's try something that keeps the kernel \"busy\" for 10 seconds..." + "Let's try something that keeps the kernel \"busy\" for 10 seconds. Execute the following code cell, and look at the indicators to see that the kernel becomes *Busy* during the execution." ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -114,69 +95,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will use Julia as our programming language of choice, but before we can do that, we need to install a Julia kernel in your home directory that jupyter can use. That can be done with the command below, so do run it, and wait until it the kernel is no longer busy.\n", + "This initial notebook uses Python as its programming language, but we will use Julia as our programming language of choice. Before jupyter can run julia code, we need to install a package that tells jupyter how to run a julia \"kernel\" for a notebook. \n", + "\n", + "That installation can be performed using the terminal that you used to run `git` to get access to this notebook, but we will use our Python kernel to execute the command instead.\n", "\n", - "(It can take quite a bit of time, depending on the performance of the network-mounted home directory.)" + "Run the code in the below cell, and wait until it the kernel is again *Idle*. (This can take quite a bit of time, depending on the performance of your network-mounted home directory.)\n", + "\n", + "If you see any error message, you may want to ask us about how to fix the situation." ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Resolving package versions...\n", - " Installed ZeroMQ_jll ────── v4.3.2+4\n", - " Installed VersionParsing ── v1.2.0\n", - " Installed SoftGlobalScope ─ v1.1.0\n", - " Installed Conda ─────────── v1.4.1\n", - " Installed IJulia ────────── v1.21.2\n", - " Installed ZMQ ───────────── v1.2.1\n", - "Downloading artifact: ZeroMQ\n", - "######################################################################## 100.0% ##O#-# 9.9% 20.2%\n", - "\u001b[1A\u001b[2K\u001b[?25h Updating `~/.julia/environments/v1.4/Project.toml`\n", - " [7073ff75] + IJulia v1.21.2\n", - " Updating `~/.julia/environments/v1.4/Manifest.toml`\n", - " [8f4d0f93] + Conda v1.4.1\n", - " [7073ff75] + IJulia v1.21.2\n", - " [682c06a0] + JSON v0.21.0\n", - " [739be429] + MbedTLS v1.0.2\n", - " [c8ffd9c3] + MbedTLS_jll v2.16.6+1\n", - " [69de0a69] + Parsers v1.0.7\n", - " [b85f4697] + SoftGlobalScope v1.1.0\n", - " [81def892] + VersionParsing v1.2.0\n", - " [c2297ded] + ZMQ v1.2.1\n", - " [8f1865be] + ZeroMQ_jll v4.3.2+4\n", - " [2a0f44e3] + Base64 \n", - " [ade2ca70] + Dates \n", - " [8ba89e20] + Distributed \n", - " [7b1f6079] + FileWatching \n", - " [b77e0a4c] + InteractiveUtils \n", - " [76f85450] + LibGit2 \n", - " [8f399da3] + Libdl \n", - " [56ddb016] + Logging \n", - " [d6f4376e] + Markdown \n", - " [a63ad114] + Mmap \n", - " [44cfe95a] + Pkg \n", - " [de0858da] + Printf \n", - " [3fa0cd96] + REPL \n", - " [9a3f8284] + Random \n", - " [ea8e919c] + SHA \n", - " [9e88b42a] + Serialization \n", - " [6462fe0b] + Sockets \n", - " [8dfed614] + Test \n", - " [cf7118a7] + UUIDs \n", - " [4ec0a83e] + Unicode \n", - " Building Conda ─→ `~/.julia/packages/Conda/3rPhK/deps/build.log`\n", - " Building IJulia → `~/.julia/packages/IJulia/DrVMH/deps/build.log`\n", - " Building Conda ─→ `~/.julia/packages/Conda/3rPhK/deps/build.log`\n", - " Building IJulia → `~/.julia/packages/IJulia/DrVMH/deps/build.log`\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "!julia --eval \"import Pkg; Pkg.add(\\\"IJulia\\\"); Pkg.build(\\\"IJulia\\\"); using IJulia\"" ] @@ -185,21 +117,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If the indicators at the bottom left and top right show that the kernel is idle, and if the cell has been given a number, then the julia kernel should have been installed and be ready to use. Now we need to restart the server, and then Julia should be available to us.\n", - "\n" + "If the indicators at the bottom left and top right show that the kernel is idle, and if the cell has been given a number, then the julia kernel should have been installed and be ready to use. Now we need to restart jupyterlab, and then Julia should be available to us." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "To restart, you need to do 3 things.\n", + "To restart, can do simply log out using the File menu, and then log in again.\n", "\n", - " 1. Select the menu item \"File\" --> \"Hub Control Panel\"\n", - " 2. Stop the server\n", - " 3. Start the server again\n", + "(Alternatively, you can use the File menu to access the Hub control panel, and then stop your server, and start it again.)\n", " \n", - "Then you should get back to this view of the files, and continue with the notebook named Julia.ipynb." + "You should then get back to the jupyterlab interface, and you should continue by opening the notebook named Julia.ipynb." ] }, { @@ -213,7 +142,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If we have more than one person trying to access the lab processes at any one time, the lab computers only allow a single user to have a jupyterlab server running at a time. Therefore, when you stop working on the lab, you should stop your server, the same way you just did, and then, when you want to resume your work, your server needs to be restarted again." + "If we have more than one person trying to access the lab processes at any one time, the lab computers only allow a single user to have a jupyterlab server running at a time. Therefore, when you stop working on the lab, you should stop your server, either by logging out or via the hub control panel, and then, when you want to resume your work, your server needs to be restarted again." ] }, { diff --git a/Furuta/Julia.ipynb b/Furuta/Julia.ipynb index 05dc3b688c7b722a0628a489162c2f82665641d8..2e0827b8b1690731efa36325cab54b8ac020392b 100644 --- a/Furuta/Julia.ipynb +++ b/Furuta/Julia.ipynb @@ -36,206 +36,111 @@ "Now, try the following code snippets, and make sure you understand what is happening. " ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "First, let's define a few values: a number, a string, a vector, a matrix, a function, and finally the same function in a different way." + ] + }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "g (generic function with 1 method)" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "function f(x)\n", - " return sin(x)\n", - "end\n", + "a = 2\n", + "b = \"Hello\"\n", + "c = [ 1 2 3 ]\n", + "d = [ 1 2; 3 4 ]\n", + "e(x) = sin(x)^2\n", "\n", - "g(x) = sin(x)" + "function f(x) \n", + " sin(x)^2\n", + "end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's look at them" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "@show a\n", + "@show b\n", + "@show c\n", + "@show d\n", + "@show e\n", + "@show f;" + ] + }, + { + "cell_type": "markdown", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.9092974268256817" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ - "f(2)" + "(The `;` ending the last line is not needed at all, and it just stops jupyter from showing the result.)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's call the function " ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "@show e(2)\n", + "@show f(2)\n", + "@show f(d);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We note that our function worked just as well on a matrix as on a number, because it used the operations `sin` and `^2` and both of those have definitions for both numbers and matrices." + ] + }, + { + "cell_type": "markdown", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.9092974268256817" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ - "g(2)" + "We can load the package named Plots and we can then plot the function we defined. (Loading a package the first time takes a bit longer than subsequent loads.)" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "using Plots" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We create a vector `xs` of numbers from 0 to 10, and a vector `ys` defined via an \"array comprehension\". There are several ways of defining vectors and matrices in Julia, and this just shows two of them." + ] + }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "image/svg+xml": [ - "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", - "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 2400 1600\">\n", - "<defs>\n", - " <clipPath id=\"clip980\">\n", - " <rect x=\"0\" y=\"0\" width=\"2400\" height=\"1600\"/>\n", - " </clipPath>\n", - "</defs>\n", - "<path clip-path=\"url(#clip980)\" d=\"\n", - "M0 1600 L2400 1600 L2400 0 L0 0 Z\n", - " \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n", - "<defs>\n", - " <clipPath id=\"clip981\">\n", - " <rect x=\"480\" y=\"0\" width=\"1681\" height=\"1600\"/>\n", - " </clipPath>\n", - "</defs>\n", - "<path clip-path=\"url(#clip980)\" d=\"\n", - "M162.455 1486.45 L2352.76 1486.45 L2352.76 47.2441 L162.455 47.2441 Z\n", - " \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n", - "<defs>\n", - " <clipPath id=\"clip982\">\n", - " <rect x=\"162\" y=\"47\" width=\"2191\" height=\"1440\"/>\n", - " </clipPath>\n", - "</defs>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 224.444,1486.45 224.444,47.2441 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 741.025,1486.45 741.025,47.2441 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 1257.61,1486.45 1257.61,47.2441 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 1774.19,1486.45 1774.19,47.2441 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 2290.77,1486.45 2290.77,47.2441 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 162.455,1446.13 2352.76,1446.13 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 162.455,1106.54 2352.76,1106.54 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 162.455,766.951 2352.76,766.951 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 162.455,427.359 2352.76,427.359 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip982)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", - " 162.455,87.7673 2352.76,87.7673 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,1486.45 2352.76,1486.45 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,1486.45 162.455,47.2441 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 224.444,1486.45 224.444,1469.18 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 741.025,1486.45 741.025,1469.18 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 1257.61,1486.45 1257.61,1469.18 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 1774.19,1486.45 1774.19,1469.18 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 2290.77,1486.45 2290.77,1469.18 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,1446.13 188.738,1446.13 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,1106.54 188.738,1106.54 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,766.951 188.738,766.951 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,427.359 188.738,427.359 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 162.455,87.7673 188.738,87.7673 \n", - " \"/>\n", - "<path clip-path=\"url(#clip980)\" d=\"M 0 0 M205.961 1508.44 Q202.35 1508.44 200.521 1512 Q198.715 1515.55 198.715 1522.67 Q198.715 1529.78 200.521 1533.35 Q202.35 1536.89 205.961 1536.89 Q209.595 1536.89 211.4 1533.35 Q213.229 1529.78 213.229 1522.67 Q213.229 1515.55 211.4 1512 Q209.595 1508.44 205.961 1508.44 M205.961 1504.73 Q211.771 1504.73 214.826 1509.34 Q217.905 1513.92 217.905 1522.67 Q217.905 1531.4 214.826 1536.01 Q211.771 1540.59 205.961 1540.59 Q200.15 1540.59 197.072 1536.01 Q194.016 1531.4 194.016 1522.67 Q194.016 1513.92 197.072 1509.34 Q200.15 1504.73 205.961 1504.73 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M222.974 1534.04 L227.859 1534.04 L227.859 1539.92 L222.974 1539.92 L222.974 1534.04 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M242.928 1508.44 Q239.317 1508.44 237.488 1512 Q235.683 1515.55 235.683 1522.67 Q235.683 1529.78 237.488 1533.35 Q239.317 1536.89 242.928 1536.89 Q246.562 1536.89 248.368 1533.35 Q250.197 1529.78 250.197 1522.67 Q250.197 1515.55 248.368 1512 Q246.562 1508.44 242.928 1508.44 M242.928 1504.73 Q248.738 1504.73 251.794 1509.34 Q254.872 1513.92 254.872 1522.67 Q254.872 1531.4 251.794 1536.01 Q248.738 1540.59 242.928 1540.59 Q237.118 1540.59 234.039 1536.01 Q230.984 1531.4 230.984 1522.67 Q230.984 1513.92 234.039 1509.34 Q237.118 1504.73 242.928 1504.73 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M717.692 1535.98 L734.011 1535.98 L734.011 1539.92 L712.067 1539.92 L712.067 1535.98 Q714.729 1533.23 719.312 1528.6 Q723.918 1523.95 725.099 1522.61 Q727.344 1520.08 728.224 1518.35 Q729.127 1516.59 729.127 1514.9 Q729.127 1512.14 727.182 1510.41 Q725.261 1508.67 722.159 1508.67 Q719.96 1508.67 717.506 1509.43 Q715.076 1510.2 712.298 1511.75 L712.298 1507.03 Q715.122 1505.89 717.576 1505.31 Q720.03 1504.73 722.067 1504.73 Q727.437 1504.73 730.631 1507.42 Q733.826 1510.11 733.826 1514.6 Q733.826 1516.73 733.016 1518.65 Q732.229 1520.54 730.122 1523.14 Q729.543 1523.81 726.442 1527.03 Q723.34 1530.22 717.692 1535.98 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M739.08 1534.04 L743.965 1534.04 L743.965 1539.92 L739.08 1539.92 L739.08 1534.04 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M749.08 1505.36 L767.437 1505.36 L767.437 1509.3 L753.363 1509.3 L753.363 1517.77 Q754.381 1517.42 755.4 1517.26 Q756.418 1517.07 757.437 1517.07 Q763.224 1517.07 766.603 1520.24 Q769.983 1523.42 769.983 1528.83 Q769.983 1534.41 766.511 1537.51 Q763.039 1540.59 756.719 1540.59 Q754.543 1540.59 752.275 1540.22 Q750.029 1539.85 747.622 1539.11 L747.622 1534.41 Q749.705 1535.54 751.928 1536.1 Q754.15 1536.66 756.627 1536.66 Q760.631 1536.66 762.969 1534.55 Q765.307 1532.44 765.307 1528.83 Q765.307 1525.22 762.969 1523.11 Q760.631 1521.01 756.627 1521.01 Q754.752 1521.01 752.877 1521.42 Q751.025 1521.84 749.08 1522.72 L749.08 1505.36 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M1229.4 1505.36 L1247.76 1505.36 L1247.76 1509.3 L1233.68 1509.3 L1233.68 1517.77 Q1234.7 1517.42 1235.72 1517.26 Q1236.74 1517.07 1237.76 1517.07 Q1243.54 1517.07 1246.92 1520.24 Q1250.3 1523.42 1250.3 1528.83 Q1250.3 1534.41 1246.83 1537.51 Q1243.36 1540.59 1237.04 1540.59 Q1234.86 1540.59 1232.59 1540.22 Q1230.35 1539.85 1227.94 1539.11 L1227.94 1534.41 Q1230.02 1535.54 1232.25 1536.1 Q1234.47 1536.66 1236.95 1536.66 Q1240.95 1536.66 1243.29 1534.55 Q1245.63 1532.44 1245.63 1528.83 Q1245.63 1525.22 1243.29 1523.11 Q1240.95 1521.01 1236.95 1521.01 Q1235.07 1521.01 1233.2 1521.42 Q1231.34 1521.84 1229.4 1522.72 L1229.4 1505.36 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M1255.37 1534.04 L1260.26 1534.04 L1260.26 1539.92 L1255.37 1539.92 L1255.37 1534.04 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M1275.33 1508.44 Q1271.71 1508.44 1269.89 1512 Q1268.08 1515.55 1268.08 1522.67 Q1268.08 1529.78 1269.89 1533.35 Q1271.71 1536.89 1275.33 1536.89 Q1278.96 1536.89 1280.76 1533.35 Q1282.59 1529.78 1282.59 1522.67 Q1282.59 1515.55 1280.76 1512 Q1278.96 1508.44 1275.33 1508.44 M1275.33 1504.73 Q1281.14 1504.73 1284.19 1509.34 Q1287.27 1513.92 1287.27 1522.67 Q1287.27 1531.4 1284.19 1536.01 Q1281.14 1540.59 1275.33 1540.59 Q1269.51 1540.59 1266.44 1536.01 Q1263.38 1531.4 1263.38 1522.67 Q1263.38 1513.92 1266.44 1509.34 Q1269.51 1504.73 1275.33 1504.73 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M1745.09 1505.36 L1767.31 1505.36 L1767.31 1507.35 L1754.76 1539.92 L1749.88 1539.92 L1761.69 1509.3 L1745.09 1509.3 L1745.09 1505.36 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M1772.38 1534.04 L1777.26 1534.04 L1777.26 1539.92 L1772.38 1539.92 L1772.38 1534.04 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M1782.38 1505.36 L1800.74 1505.36 L1800.74 1509.3 L1786.66 1509.3 L1786.66 1517.77 Q1787.68 1517.42 1788.7 1517.26 Q1789.72 1517.07 1790.74 1517.07 Q1796.52 1517.07 1799.9 1520.24 Q1803.28 1523.42 1803.28 1528.83 Q1803.28 1534.41 1799.81 1537.51 Q1796.34 1540.59 1790.02 1540.59 Q1787.84 1540.59 1785.57 1540.22 Q1783.33 1539.85 1780.92 1539.11 L1780.92 1534.41 Q1783.01 1535.54 1785.23 1536.1 Q1787.45 1536.66 1789.93 1536.66 Q1793.93 1536.66 1796.27 1534.55 Q1798.61 1532.44 1798.61 1528.83 Q1798.61 1525.22 1796.27 1523.11 Q1793.93 1521.01 1789.93 1521.01 Q1788.05 1521.01 1786.18 1521.42 Q1784.32 1521.84 1782.38 1522.72 L1782.38 1505.36 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M2249.16 1535.98 L2256.8 1535.98 L2256.8 1509.62 L2248.49 1511.29 L2248.49 1507.03 L2256.75 1505.36 L2261.43 1505.36 L2261.43 1535.98 L2269.06 1535.98 L2269.06 1539.92 L2249.16 1539.92 L2249.16 1535.98 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M2284.13 1508.44 Q2280.52 1508.44 2278.69 1512 Q2276.89 1515.55 2276.89 1522.67 Q2276.89 1529.78 2278.69 1533.35 Q2280.52 1536.89 2284.13 1536.89 Q2287.77 1536.89 2289.57 1533.35 Q2291.4 1529.78 2291.4 1522.67 Q2291.4 1515.55 2289.57 1512 Q2287.77 1508.44 2284.13 1508.44 M2284.13 1504.73 Q2289.94 1504.73 2293 1509.34 Q2296.08 1513.92 2296.08 1522.67 Q2296.08 1531.4 2293 1536.01 Q2289.94 1540.59 2284.13 1540.59 Q2278.32 1540.59 2275.25 1536.01 Q2272.19 1531.4 2272.19 1522.67 Q2272.19 1513.92 2275.25 1509.34 Q2278.32 1504.73 2284.13 1504.73 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M2301.15 1534.04 L2306.03 1534.04 L2306.03 1539.92 L2301.15 1539.92 L2301.15 1534.04 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M2321.1 1508.44 Q2317.49 1508.44 2315.66 1512 Q2313.86 1515.55 2313.86 1522.67 Q2313.86 1529.78 2315.66 1533.35 Q2317.49 1536.89 2321.1 1536.89 Q2324.74 1536.89 2326.54 1533.35 Q2328.37 1529.78 2328.37 1522.67 Q2328.37 1515.55 2326.54 1512 Q2324.74 1508.44 2321.1 1508.44 M2321.1 1504.73 Q2326.91 1504.73 2329.97 1509.34 Q2333.05 1513.92 2333.05 1522.67 Q2333.05 1531.4 2329.97 1536.01 Q2326.91 1540.59 2321.1 1540.59 Q2315.29 1540.59 2312.21 1536.01 Q2309.16 1531.4 2309.16 1522.67 Q2309.16 1513.92 2312.21 1509.34 Q2315.29 1504.73 2321.1 1504.73 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M63.2236 1448.53 L75.7004 1448.53 L75.7004 1452.33 L63.2236 1452.33 L63.2236 1448.53 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M81.58 1459.48 L89.2188 1459.48 L89.2188 1433.11 L80.9087 1434.78 L80.9087 1430.52 L89.1725 1428.85 L93.8484 1428.85 L93.8484 1459.48 L101.487 1459.48 L101.487 1463.41 L81.58 1463.41 L81.58 1459.48 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M106.557 1457.53 L111.441 1457.53 L111.441 1463.41 L106.557 1463.41 L106.557 1457.53 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M126.51 1431.93 Q122.899 1431.93 121.071 1435.5 Q119.265 1439.04 119.265 1446.17 Q119.265 1453.27 121.071 1456.84 Q122.899 1460.38 126.51 1460.38 Q130.145 1460.38 131.95 1456.84 Q133.779 1453.27 133.779 1446.17 Q133.779 1439.04 131.95 1435.5 Q130.145 1431.93 126.51 1431.93 M126.51 1428.23 Q132.32 1428.23 135.376 1432.84 Q138.455 1437.42 138.455 1446.17 Q138.455 1454.9 135.376 1459.5 Q132.32 1464.08 126.51 1464.08 Q120.7 1464.08 117.621 1459.5 Q114.566 1454.9 114.566 1446.17 Q114.566 1437.42 117.621 1432.84 Q120.7 1428.23 126.51 1428.23 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M62.9921 1108.94 L75.4689 1108.94 L75.4689 1112.73 L62.9921 1112.73 L62.9921 1108.94 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M90.5383 1092.34 Q86.9272 1092.34 85.0985 1095.91 Q83.2929 1099.45 83.2929 1106.58 Q83.2929 1113.68 85.0985 1117.25 Q86.9272 1120.79 90.5383 1120.79 Q94.1725 1120.79 95.9781 1117.25 Q97.8068 1113.68 97.8068 1106.58 Q97.8068 1099.45 95.9781 1095.91 Q94.1725 1092.34 90.5383 1092.34 M90.5383 1088.64 Q96.3484 1088.64 99.404 1093.24 Q102.483 1097.83 102.483 1106.58 Q102.483 1115.3 99.404 1119.91 Q96.3484 1124.49 90.5383 1124.49 Q84.7281 1124.49 81.6494 1119.91 Q78.5939 1115.3 78.5939 1106.58 Q78.5939 1097.83 81.6494 1093.24 Q84.7281 1088.64 90.5383 1088.64 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M107.552 1117.94 L112.436 1117.94 L112.436 1123.82 L107.552 1123.82 L107.552 1117.94 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M117.552 1089.26 L135.908 1089.26 L135.908 1093.2 L121.834 1093.2 L121.834 1101.67 Q122.853 1101.32 123.871 1101.16 Q124.89 1100.97 125.908 1100.97 Q131.695 1100.97 135.075 1104.15 Q138.455 1107.32 138.455 1112.73 Q138.455 1118.31 134.982 1121.41 Q131.51 1124.49 125.191 1124.49 Q123.015 1124.49 120.746 1124.12 Q118.501 1123.75 116.094 1123.01 L116.094 1118.31 Q118.177 1119.45 120.399 1120 Q122.621 1120.56 125.098 1120.56 Q129.103 1120.56 131.441 1118.45 Q133.779 1116.35 133.779 1112.73 Q133.779 1109.12 131.441 1107.02 Q129.103 1104.91 125.098 1104.91 Q123.223 1104.91 121.348 1105.33 Q119.496 1105.74 117.552 1106.62 L117.552 1089.26 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M89.5429 752.749 Q85.9318 752.749 84.1031 756.314 Q82.2976 759.856 82.2976 766.985 Q82.2976 774.092 84.1031 777.656 Q85.9318 781.198 89.5429 781.198 Q93.1771 781.198 94.9827 777.656 Q96.8114 774.092 96.8114 766.985 Q96.8114 759.856 94.9827 756.314 Q93.1771 752.749 89.5429 752.749 M89.5429 749.046 Q95.3531 749.046 98.4086 753.652 Q101.487 758.235 101.487 766.985 Q101.487 775.712 98.4086 780.318 Q95.3531 784.902 89.5429 784.902 Q83.7328 784.902 80.6541 780.318 Q77.5985 775.712 77.5985 766.985 Q77.5985 758.235 80.6541 753.652 Q83.7328 749.046 89.5429 749.046 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M106.557 778.351 L111.441 778.351 L111.441 784.231 L106.557 784.231 L106.557 778.351 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M126.51 752.749 Q122.899 752.749 121.071 756.314 Q119.265 759.856 119.265 766.985 Q119.265 774.092 121.071 777.656 Q122.899 781.198 126.51 781.198 Q130.145 781.198 131.95 777.656 Q133.779 774.092 133.779 766.985 Q133.779 759.856 131.95 756.314 Q130.145 752.749 126.51 752.749 M126.51 749.046 Q132.32 749.046 135.376 753.652 Q138.455 758.235 138.455 766.985 Q138.455 775.712 135.376 780.318 Q132.32 784.902 126.51 784.902 Q120.7 784.902 117.621 780.318 Q114.566 775.712 114.566 766.985 Q114.566 758.235 117.621 753.652 Q120.7 749.046 126.51 749.046 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M90.5383 413.158 Q86.9272 413.158 85.0985 416.722 Q83.2929 420.264 83.2929 427.394 Q83.2929 434.5 85.0985 438.065 Q86.9272 441.607 90.5383 441.607 Q94.1725 441.607 95.9781 438.065 Q97.8068 434.5 97.8068 427.394 Q97.8068 420.264 95.9781 416.722 Q94.1725 413.158 90.5383 413.158 M90.5383 409.454 Q96.3484 409.454 99.404 414.06 Q102.483 418.644 102.483 427.394 Q102.483 436.12 99.404 440.727 Q96.3484 445.31 90.5383 445.31 Q84.7281 445.31 81.6494 440.727 Q78.5939 436.12 78.5939 427.394 Q78.5939 418.644 81.6494 414.06 Q84.7281 409.454 90.5383 409.454 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M107.552 438.759 L112.436 438.759 L112.436 444.639 L107.552 444.639 L107.552 438.759 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M117.552 410.079 L135.908 410.079 L135.908 414.014 L121.834 414.014 L121.834 422.486 Q122.853 422.139 123.871 421.977 Q124.89 421.792 125.908 421.792 Q131.695 421.792 135.075 424.963 Q138.455 428.134 138.455 433.551 Q138.455 439.13 134.982 442.232 Q131.51 445.31 125.191 445.31 Q123.015 445.31 120.746 444.94 Q118.501 444.569 116.094 443.829 L116.094 439.13 Q118.177 440.264 120.399 440.819 Q122.621 441.375 125.098 441.375 Q129.103 441.375 131.441 439.269 Q133.779 437.162 133.779 433.551 Q133.779 429.94 131.441 427.833 Q129.103 425.727 125.098 425.727 Q123.223 425.727 121.348 426.144 Q119.496 426.56 117.552 427.44 L117.552 410.079 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M81.58 101.112 L89.2188 101.112 L89.2188 74.7466 L80.9087 76.4132 L80.9087 72.154 L89.1725 70.4873 L93.8484 70.4873 L93.8484 101.112 L101.487 101.112 L101.487 105.047 L81.58 105.047 L81.58 101.112 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M106.557 99.1677 L111.441 99.1677 L111.441 105.047 L106.557 105.047 L106.557 99.1677 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M126.51 73.566 Q122.899 73.566 121.071 77.1308 Q119.265 80.6725 119.265 87.802 Q119.265 94.9085 121.071 98.4733 Q122.899 102.015 126.51 102.015 Q130.145 102.015 131.95 98.4733 Q133.779 94.9085 133.779 87.802 Q133.779 80.6725 131.95 77.1308 Q130.145 73.566 126.51 73.566 M126.51 69.8623 Q132.32 69.8623 135.376 74.4688 Q138.455 79.0521 138.455 87.802 Q138.455 96.5288 135.376 101.135 Q132.32 105.719 126.51 105.719 Q120.7 105.719 117.621 101.135 Q114.566 96.5288 114.566 87.802 Q114.566 79.0521 117.621 74.4688 Q120.7 69.8623 126.51 69.8623 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><polyline clip-path=\"url(#clip982)\" style=\"stroke:#009af9; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 224.444,766.951 245.316,698.463 266.188,630.673 287.06,564.273 307.932,499.939 328.804,438.327 349.676,380.065 370.548,325.747 391.42,275.926 412.292,231.112 \n", - " 433.164,191.76 454.036,158.272 474.908,130.989 495.78,110.189 516.651,96.0841 537.523,88.8185 558.395,88.4661 579.267,95.0303 600.139,108.444 621.011,128.572 \n", - " 641.883,155.207 662.755,188.078 683.627,226.85 704.499,271.129 725.371,320.462 746.243,374.347 767.115,432.234 787.987,493.533 808.859,557.62 829.731,623.841 \n", - " 850.602,691.52 871.474,759.969 892.346,828.489 913.218,896.381 934.09,962.954 954.962,1027.53 975.834,1089.45 996.706,1148.08 1017.58,1202.82 1038.45,1253.13 \n", - " 1059.32,1298.47 1080.19,1338.4 1101.07,1372.5 1121.94,1400.43 1142.81,1421.9 1163.68,1436.69 1184.55,1444.66 1205.43,1445.72 1226.3,1439.85 1247.17,1427.13 \n", - " 1268.04,1407.68 1288.91,1381.7 1309.79,1349.44 1330.66,1311.26 1351.53,1267.52 1372.4,1218.68 1393.27,1165.23 1414.14,1107.72 1435.02,1046.74 1455.89,982.912 \n", - " 1476.76,916.877 1497.63,849.315 1518.5,780.913 1539.38,712.368 1560.25,644.38 1581.12,577.642 1601.99,512.833 1622.86,450.615 1643.74,391.622 1664.61,336.455 \n", - " 1685.48,285.677 1706.35,239.805 1727.22,199.306 1748.1,164.595 1768.97,136.024 1789.84,113.886 1810.71,98.4042 1831.58,89.7384 1852.46,87.9763 1873.33,93.1359 \n", - " 1894.2,105.165 1915.07,123.94 1935.94,149.27 1956.82,180.897 1977.69,218.499 1998.56,261.692 2019.43,310.035 2040.3,363.037 2061.17,420.156 2082.05,480.81 \n", - " 2102.92,544.382 2123.79,610.222 2144.66,677.66 2165.53,746.009 2186.41,814.571 2207.28,882.647 2228.15,949.544 2249.02,1014.58 2269.89,1077.09 2290.77,1136.44 \n", - " \n", - " \"/>\n", - "<path clip-path=\"url(#clip980)\" d=\"\n", - "M1985.36 216.178 L2279.75 216.178 L2279.75 95.2176 L1985.36 95.2176 Z\n", - " \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 1985.36,216.178 2279.75,216.178 2279.75,95.2176 1985.36,95.2176 1985.36,216.178 \n", - " \"/>\n", - "<polyline clip-path=\"url(#clip980)\" style=\"stroke:#009af9; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", - " 2009.7,155.698 2155.72,155.698 \n", - " \"/>\n", - "<path clip-path=\"url(#clip980)\" d=\"M 0 0 M2193.9 175.385 Q2192.09 180.015 2190.38 181.427 Q2188.67 182.839 2185.79 182.839 L2182.39 182.839 L2182.39 179.274 L2184.89 179.274 Q2186.65 179.274 2187.62 178.44 Q2188.6 177.607 2189.78 174.505 L2190.54 172.561 L2180.05 147.052 L2184.57 147.052 L2192.67 167.329 L2200.77 147.052 L2205.29 147.052 L2193.9 175.385 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /><path clip-path=\"url(#clip980)\" d=\"M 0 0 M2211.17 169.042 L2218.8 169.042 L2218.8 142.677 L2210.49 144.343 L2210.49 140.084 L2218.76 138.418 L2223.43 138.418 L2223.43 169.042 L2231.07 169.042 L2231.07 172.978 L2211.17 172.978 L2211.17 169.042 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"1\" /></svg>\n" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "xs = range(0, 10, length=100)\n", "ys = [ f(x) for x in xs ]\n", @@ -244,138 +149,62 @@ ] }, { - "cell_type": "code", - "execution_count": 6, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "using LinearAlgebra" + "Matrix-vector operations use `'` for transposition, and `*` for the multiplication operations." ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×2 Array{Int64,2}:\n", - " 1 2\n", - " 3 4" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "A = [ 1 2; 3 4 ]" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2-element Array{Int64,1}:\n", - " 0\n", - " 1" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "B = [ 0; 1 ]" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1×2 Adjoint{Int64,Array{Int64,1}}:\n", - " 0 1" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "B'" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2-element Array{Int64,1}:\n", - " 2\n", - " 4" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "A*B" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1×2 Adjoint{Int64,Array{Int64,1}}:\n", - " 3 4" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "B'*A" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "4" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "B'*A*B" ] @@ -384,7 +213,41 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "When you feel a bit more familiar with Julia, there are other notebooks here for the actual Labs." + "There are many packages that can be loaded, and we will some more later in this course. As one additional example, we perform singular value decomposition and eigendecomposition of our matrix." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "using LinearAlgebra" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "svd(A)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "eigen(A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This was our very brief introduction to Julia, and you can now continue to the notebooks for the actual labs." ] }, { @@ -397,15 +260,15 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.4.2", + "display_name": "Julia 1.5.0", "language": "julia", - "name": "julia-1.4" + "name": "julia-1.5" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.4.2" + "version": "1.5.0" } }, "nbformat": 4,