Mercurial > web-octave
comparison index.html @ 98:86b96d9a0075
Format main page.
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Tue, 01 Nov 2016 10:40:39 +0100 |
parents | e7efa40deb17 |
children | 34cd51c807b1 |
comparison
equal
deleted
inserted
replaced
97:7dd5053fdca1 | 98:86b96d9a0075 |
---|---|
28 </div> | 28 </div> |
29 </div> | 29 </div> |
30 </div> | 30 </div> |
31 </section> | 31 </section> |
32 | 32 |
33 <section id="syntax"> | 33 <section> |
34 <h3>Syntax Examples</h3> | 34 <h3>Syntax Examples</h3> |
35 | 35 |
36 <div class="row"> | 36 <div class="row"> |
37 <div class="columns medium-12"> | 37 <div class="columns medium-12"> |
38 <p> | 38 <p> |
39 The Octave syntax is largely compatible with <a href="http://www.mathworks.com/matlab">Matlab</a>. The Octave interpreter can be run in GUI mode, as a console, or invoked as part of a shell script. | 39 The Octave syntax is largely compatible with |
40 <a href="http://www.mathworks.com/matlab">Matlab</a>. | |
41 The Octave interpreter can be run in GUI mode, as a console, | |
42 or invoked as part of a shell script. | |
40 </p> | 43 </p> |
41 </div> | 44 </div> |
42 </div> | 45 </div> |
43 | 46 |
44 <div class="row"> | 47 <div class="row"> |
45 <div class="columns medium-4" > | 48 <div class="columns medium-4" > |
46 <p>Solve systems of equations with linear algebra operations on <strong>vectors</strong> and <strong>matrices</strong></p> | 49 <p> |
50 Solve systems of equations with linear algebra operations on | |
51 <strong>vectors</strong> and <strong>matrices</strong>. | |
52 </p> | |
47 </div> | 53 </div> |
48 <div class="columns medium-8"> | 54 <div class="columns medium-8"> |
49 {% highlight matlab%} | 55 {% highlight octave %} |
50 b = [4; 9; 2] % Column vector | 56 b = [4; 9; 2] # Column vector |
51 A = [ 3 4 5; | 57 A = [ 3 4 5; |
52 1 3 1; | 58 1 3 1; |
53 3 5 9 ] | 59 3 5 9 ] |
54 x = A \ b % Solve the system by inverting A | 60 x = A \ b # Solve the system Ax = b by inverting A |
55 {% endhighlight %} | 61 {% endhighlight %} |
56 </div> | 62 </div> |
57 </div> | 63 </div> |
58 | 64 |
59 <div class="row"> | 65 <div class="row"> |
60 <div class="columns medium-4"> | 66 <div class="columns medium-4"> |
61 <p>Visualize data with <strong>high-level plot commands</strong> in 2D and 3D</p> | 67 <p> |
68 Visualize data with <strong>high-level plot commands</strong> | |
69 in 2D and 3D. | |
70 </p> | |
62 </div> | 71 </div> |
63 <div class="columns medium-8"> | 72 <div class="columns medium-8"> |
64 {% highlight matlab %} | 73 {% highlight octave %} |
65 x = -10:0.1:10 # Create an evenly-spaced vector from -10..10 | 74 x = -10:0.1:10; # Create an evenly-spaced vector from -10..10 |
66 y = sin (x) # y is also a vector | 75 y = sin (x); # y is also a vector |
67 plot (x, y) | 76 plot (x, y); |
77 title ("Simple 2-D Plot"); | |
78 xlabel ("x"); | |
79 ylabel ("sin (x)"); | |
68 {% endhighlight %} | 80 {% endhighlight %} |
69 <div class="text-left"> | 81 <div class="text-left"> |
70 <a href="#" data-reveal-id="plotModal"> | 82 <a href="#" data-reveal-id="plotModal"> |
71 <img src="{{ "/img/example-plot.png" | relative_url }}" style="height: 12rem; width: auto;"/> | 83 <img src="{{ "/img/example-plot.png" | relative_url }}" style="height: 12rem; width: auto;"/> |
72 <span class="label">Expand</span> | 84 <span class="label">Expand</span> |
88 </a> | 100 </a> |
89 </div> | 101 </div> |
90 </div> | 102 </div> |
91 </section> | 103 </section> |
92 | 104 |
93 <section id="forge"> | 105 <section> |
94 <h3>Octave Forge</h3> | 106 <h3>Octave Forge</h3> |
95 <div class="row"> | 107 <div class="row"> |
96 <div class="columns medium-9"> | 108 <div class="columns medium-9"> |
97 <p> | 109 <p> |
98 <a href="http://octave.sourceforge.net/">Octave Forge</a> is a central location for development of packages for GNU Octave, similar to Matlab's toolboxes. To install a package, use the pkg command from the Octave prompt by typing: | 110 <a href="http://octave.sourceforge.net/">Octave Forge</a> |
111 is a central location for development of packages for GNU Octave, | |
112 similar to Matlab's toolboxes. To install a package, use the | |
113 <code>pkg</code> command from the Octave prompt by typing: | |
99 </p> | 114 </p> |
100 {% highlight text %} | 115 {% highlight text %} |
101 pkg install -forge package_name | 116 pkg install -forge package_name |
102 pkg load package_name | 117 pkg load package_name |
103 {% endhighlight %} | 118 {% endhighlight %} |
106 <a href="http://octave.sourceforge.net/packages.php" class="button expand">Browse Packages</a> | 121 <a href="http://octave.sourceforge.net/packages.php" class="button expand">Browse Packages</a> |
107 </div> | 122 </div> |
108 </div> | 123 </div> |
109 </section> | 124 </section> |
110 | 125 |
111 <section id="develop"> | 126 <section> |
112 <h3>Development</h3> | 127 <h3>Development</h3> |
113 <p> | 128 <p> |
114 Octave is free software licensed under the <a href="{{ "license.html" | relative_url }}">GNU General Public License (GPL)</a>. Assuming you have Mercurial installed on your machine you may obtain the latest development version of Octave sources with the following command: | 129 Octave is free software licensed under the |
130 <a href="{{ "license.html" | relative_url }}">GNU General Public License (GPL)</a>. | |
131 Assuming you have Mercurial installed on your machine | |
132 you may obtain the latest development version of Octave sources | |
133 with the following command: | |
115 </p> | 134 </p> |
116 <p style="margin-left:1rem"><code>hg clone http://www.octave.org/hg/octave</code></p> | 135 {% highlight text %} |
136 hg clone http://www.octave.org/hg/octave | |
137 {% endhighlight %} | |
117 <p> | 138 <p> |
118 If you want to participate in Octave development, join the <a href="https://lists.gnu.org/mailman/listinfo/octave-maintainers">maintainers@octave.org</a> mailing list. | 139 If you want to participate in Octave development, join the |
140 <a href="https://lists.gnu.org/mailman/listinfo/octave-maintainers">maintainers@octave.org</a> | |
141 mailing list. | |
119 </p> | 142 </p> |
120 </section> | 143 </section> |
121 | 144 |
122 <section id="latest"> | 145 <section id="latest"> |
123 <div class="row"> | 146 <div class="row"> |
145 <img src="{{ "/img/example-plot.png" | relative_url }}" /> | 168 <img src="{{ "/img/example-plot.png" | relative_url }}" /> |
146 <a class="close-reveal-modal" aria-label="Close">×</a> | 169 <a class="close-reveal-modal" aria-label="Close">×</a> |
147 </div> | 170 </div> |
148 | 171 |
149 <div id="guiModal" class="reveal-modal" data-reveal aria-hidden="true" role="dialog"> | 172 <div id="guiModal" class="reveal-modal" data-reveal aria-hidden="true" role="dialog"> |
150 <img src="{{ "/img/screenshot-2016-small.png" | relative_url }}" title="GNU Octave 4.0.3 - Licensed under CC BY-SA 3.0"/> | 173 <img src="{{ "/img/screenshot-2016.png" | relative_url }}" title="GNU Octave 4.0.3 - Licensed under CC BY-SA 3.0"/> |
151 <a class="close-reveal-modal" aria-label="Close">×</a> | 174 <a class="close-reveal-modal" aria-label="Close">×</a> |
152 </div> | 175 </div> |