Mercurial > hg > what-is-octave
comparison PoliMI2012/what-is-octave.tex @ 4:0a1567794b40
[mq]: folder_reorganization
author | Carlo de Falco <cdf@users.sourceforge.net> |
---|---|
date | Thu, 08 Nov 2012 09:55:34 +0100 |
parents | what-is-octave.tex@8e32f52a1888 |
children | f8c352d9af2d |
comparison
equal
deleted
inserted
replaced
3:acc25d26e9e5 | 4:0a1567794b40 |
---|---|
1 \documentclass[10pt]{beamer} | |
2 | |
3 | |
4 \usetheme{Octave} | |
5 \usepackage{thumbpdf} | |
6 \usepackage{wasysym} | |
7 \usepackage{ucs} | |
8 \usepackage[utf8]{inputenc} | |
9 \usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade} | |
10 \usepackage{verbatim} | |
11 \usepackage{listings} | |
12 \usepackage{attachfile} | |
13 \lstset{ | |
14 language=C++, | |
15 keywordstyle=\bfseries\ttfamily\color[rgb]{0,0,1}, | |
16 identifierstyle=\ttfamily, | |
17 commentstyle=\color[rgb]{0.133,0.545,0.133}, | |
18 stringstyle=\ttfamily\color[rgb]{0.627,0.126,0.941}, | |
19 showstringspaces=false, | |
20 basicstyle=\scriptsize, | |
21 numberstyle=\tiny, | |
22 numbers=left, | |
23 stepnumber=1, | |
24 numbersep=10pt, | |
25 tabsize=2, | |
26 breaklines=true, | |
27 prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}}, | |
28 breakatwhitespace=false, | |
29 aboveskip={1.5\baselineskip}, | |
30 columns=fixed, | |
31 upquote=true, | |
32 extendedchars=true, | |
33 } | |
34 | |
35 %\pdfinfo | |
36 %{ | |
37 % /Title (What is Octave?) | |
38 % /Creator (TeX) | |
39 % /Author (Jordi Guti\'errez Hermoso) | |
40 %} | |
41 | |
42 | |
43 \title{GNU Octave\\ A free high-level tool for Scientific Computing} | |
44 \author[cdf, jgh]{{\bf Carlo de Falco}, Jordi Guti\'errez Hermoso} | |
45 | |
46 \begin{document} | |
47 | |
48 \frame[plain]{\titlepage} | |
49 | |
50 \section*{} | |
51 \begin{frame} | |
52 \frametitle{Outline} | |
53 \tableofcontents[section=2] | |
54 \end{frame} | |
55 | |
56 \AtBeginSection[] | |
57 {\frame<handout:0>{\frametitle{Outline}\tableofcontents[currentsection]}} | |
58 | |
59 \AtBeginSubsection[] | |
60 {\frame<handout:0>{\frametitle{Outline}\tableofcontents[sectionstyle=show/hide,subsectionstyle=show/shaded/hide]}} | |
61 | |
62 \newcommand<>{\highlighton}[1]{% | |
63 \alt#2{\structure{#1}}{{#1}}} | |
64 | |
65 \newcommand{\icon}[1]{\pgfimage[height=1em]{#1}} | |
66 | |
67 | |
68 | |
69 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
70 %%%%%%%%%% Content starts here %%%%%%%%%% | |
71 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
72 | |
73 \section{What is Octave?} | |
74 \subsection{Definition} | |
75 \begin{frame} | |
76 \frametitle{What is Octave?} | |
77 \begin{block}{Octave} | |
78 {\it ``A \underline{free} \only<1->{\footnote{``free'' = ``libero'' $\neq$ ``gratis''}} | |
79 numerical environment mostly compatible with \sc{Matlab}''}\\[3mm] | |
80 \begin{itemize} | |
81 \item What is compatibility? A point of much debate... | |
82 \item If it works in | |
83 {\sc{Matlab}}, it should work in Octave. | |
84 \item If it breaks it is considered a bug. | |
85 \item If it works in Octave, it can break in {\sc{Matlab}}. | |
86 \end{itemize} | |
87 \end{block} | |
88 \end{frame} | |
89 | |
90 \begin{frame} | |
91 \frametitle{Lines of code} | |
92 The stuff Octave is made of... | |
93 \pause | |
94 \begin{block}{Core} | |
95 \begin{itemize} | |
96 \item About 600,000 lines of C++ | |
97 \item About 100,000 lines of m-scripts | |
98 \item About 50,000 lines of Fortran | |
99 \end{itemize} | |
100 \end{block} | |
101 \pause | |
102 \begin{block}{Octave-Forge} | |
103 \begin{itemize} | |
104 \item About 200,000 lines of C++ | |
105 \item About 330,000 lines of m-scripts | |
106 \item About 50,000 lines of Fortran | |
107 \end{itemize} | |
108 \end{block} | |
109 \end{frame} | |
110 | |
111 | |
112 \begin{frame} | |
113 \frametitle{Features} | |
114 \begin{block}{Current features} | |
115 \begin{itemize} | |
116 \item N-d arrays, linear algebra, sparse matrices | |
117 \item Nonlinear equations | |
118 \item Ordinary/Algebraic Differential Equations, | |
119 \item Image processing, statistics, special functions | |
120 \item Many more... | |
121 \end{itemize} | |
122 \end{block} | |
123 | |
124 \begin{block}{Features in development} | |
125 \begin{itemize} | |
126 \item GUI | |
127 \item JIT compiling | |
128 \item classdef OOP | |
129 %\item Least squares spectral analysis | |
130 \end{itemize} | |
131 \end{block} | |
132 \end{frame} | |
133 | |
134 \begin{frame} | |
135 \frametitle{What does it look like} | |
136 \begin{itemize} | |
137 \item Primarily a CLI interface | |
138 \only<1>{\begin{figure} | |
139 \begin{center} | |
140 \includegraphics[height=.6\textheight]{screenshot} | |
141 \caption{CLI screenshot}\end{center} | |
142 \end{figure}} | |
143 \pause | |
144 \item Most requested feature: GUI! Will ship with next release (4.0) | |
145 \pause | |
146 \only<2->{\begin{figure} | |
147 \begin{center} | |
148 \includegraphics[height=.6\textheight]{gui_screenshot.jpg} | |
149 \caption{Qt based GUI development started as J. Dawid's GSoC2012 project} | |
150 \end{center} | |
151 \end{figure}} | |
152 \end{itemize} | |
153 \end{frame} | |
154 | |
155 | |
156 \subsection{History} | |
157 | |
158 \begin{frame} | |
159 \frametitle{In the beginning... } | |
160 | |
161 | |
162 \begin{itemize} | |
163 \item Companion software for chemical reactor textbook by James B. Rawlings | |
164 and John G. Ekerdt | |
165 \item John W. Eaton (hereafter, jwe) started coding in 1993 | |
166 \end{itemize} | |
167 \pause | |
168 | |
169 \begin{block}{Rawlings said...} | |
170 \begin{quote} | |
171 \center Why don't you call it ``Octave''? | |
172 \end{quote} | |
173 \end{block} | |
174 | |
175 \begin{itemize} | |
176 \item Octave refers to Octave Levenspiel, nothing to do with music ... | |
177 \end{itemize} | |
178 | |
179 \end{frame} | |
180 | |
181 \begin{frame} | |
182 \frametitle{jwe is a lone wolf...} | |
183 | |
184 jwe works almost completely alone for first four or five years. | |
185 | |
186 \pause | |
187 | |
188 \begin{block}{In the very beginning...} | |
189 \begin{itemize} | |
190 \item No mailing lists | |
191 \item No widespread announcements | |
192 \item No VCS (these were dark times) | |
193 \end{itemize} | |
194 \end{block} | |
195 \end{frame} | |
196 | |
197 \begin{frame} | |
198 \frametitle{Contributions slowly trickle in} | |
199 \begin{block}{Timeline} | |
200 \begin{itemize} | |
201 \item[1989] Planning stages | |
202 \item[1992] Development begins | |
203 \item[1993] First public announcement | |
204 \item[1994] Version 1.0 | |
205 \item[1996] Version 2.0 | |
206 \item[1998] Version 2.1 development | |
207 \item[2004] Version 2.9 in preparation for 3.0 release | |
208 \item[2007] Version 3.0 major upgrade | |
209 \item[2010] Version 3.2.4, last before using hg | |
210 \item[2011] Version 3.4.0 | |
211 \item[2012] Version 3.6.4 | |
212 \end{itemize} | |
213 \end{block} | |
214 \end{frame} | |
215 | |
216 \begin{frame} | |
217 \frametitle{Contributions slowly trickle in} | |
218 \begin{block}{Milestones} | |
219 \begin{itemize} | |
220 \item[1994] Most of the current basic functionality already in. | |
221 (Much was written during its first two years!) | |
222 \pause | |
223 \item[1995] Structs, {\sc{Matlab}}-style plot() command. | |
224 \item[1998] Original sparse matrix implementation | |
225 \item[2001] Octave-Forge's first commit | |
226 \item[2006] MEX interface in core | |
227 \item[2007] Implementation of handle graphics, full support for sparse matrices | |
228 \item[2009] OpenGL plotting | |
229 \item[2010] -forge option for pkg.m | |
230 \item[2011] Profiler | |
231 \item[2012] Nested functions | |
232 \pause | |
233 \item[2013?] GUI, JIT compiling | |
234 \end{itemize} | |
235 \end{block} | |
236 \end{frame} | |
237 | |
238 | |
239 \subsection{Community dynamics} | |
240 | |
241 \begin{frame} | |
242 \frametitle{Web resources} | |
243 \begin{block}{Web pages} | |
244 \begin{itemize} | |
245 \item \href{http://www.octave.org/}{Octave website} | |
246 \item \href{http://octave.sf.net/}{Octave-Forge website} | |
247 \item \href{http://wiki.octave.org/}{Octave wiki} | |
248 \end{itemize} | |
249 \end{block} | |
250 | |
251 \begin{block}{Users communication} | |
252 \begin{itemize} | |
253 \item \href{https://mailman.cae.wisc.edu/listinfo/help-octave}{Octave users mailing list} | |
254 \item \href{https://lists.sourceforge.net/lists/listinfo/octave-dev}{Octave-Forge mailing list} | |
255 \item \href{http://webchat.freenode.net/?channels=octave&uio=MT1mYWxzZSYyPXRydWUmMTI9dHJ1ZQda} | |
256 {\#octave channel in Freenode} | |
257 \item \href{http://savannah.gnu.org/bugs/?group=octave}{Savannah bug tracker} | |
258 \end{itemize} | |
259 \end{block} | |
260 \pause | |
261 \begin{block}{Developers collaboration} | |
262 \begin{itemize} | |
263 \item \href{http://hg.savannah.gnu.org/hgweb/octave/shortlog}{Octave Mercurial repository} | |
264 \item \href{http://sourceforge.net/p/octave/code}{Octave-Forge Subversion repository} | |
265 \end{itemize} | |
266 \end{block} | |
267 \end{frame} | |
268 | |
269 \begin{frame} | |
270 \frametitle{Social structure} | |
271 \begin{itemize} | |
272 \item Like all free projects, every user is a potential developer. | |
273 \item 15 current Core developers (with write access to repo) | |
274 \only<1>{\begin{figure} | |
275 \centering | |
276 \includegraphics[width=.5\linewidth]{Core-developers} | |
277 \end{figure}} | |
278 \only<2->{\item 49 currently registered 'Forge developers (38 active)} | |
279 \only<2>{\begin{figure} | |
280 \centering | |
281 \includegraphics[width=.6\linewidth]{Forge-developers} | |
282 \end{figure}} | |
283 \only<3->{\item 296 total contributors over all time\\} | |
284 {\only<3>{\fontsize{1}{.1}\selectfont | |
285 Ben Abbott Andy Adler Giles Anderson | |
286 Joel Andersson Muthiah Annamalai Marco Atzeri | |
287 Shai Ayal Roger Banks Ben Barrowes | |
288 Alexander Barth David Bateman Heinz Bauschke | |
289 Roman Belov Karl Berry David Billinghurst | |
290 Don Bindner Jakub Bogusz Moritz Borgmann | |
291 Paul Boven Richard Bovey John Bradshaw | |
292 Marcus Brinkmann Remy Bruno Ansgar Burchard | |
293 Marco Caliari Daniel Calvelo John C. Campbell | |
294 Juan Pablo Carbajal Jean-Francois Cardoso Joao Cardoso | |
295 Larrie Carr David Castelow Vincent Cautaerts | |
296 Clinton Chee Albert Chin-A-Young Carsten Clark | |
297 J. D. Cole Martin Costabel Michael Creel | |
298 Jeff Cunningham Martin Dalecki Jorge Barros de Abreu | |
299 Carlo de Falco Jacob Dawid Thomas D. Dean | |
300 Philippe Defert Bill Denney Fabian Deutsch | |
301 Christos Dimitrakakis David M. Doolin Carnë Draug | |
302 Pascal A. Dupuis John W. Eaton Dirk Eddelbuettel | |
303 Pieter Eendebak Paul Eggert Stephen Eglen | |
304 Peter Ekberg Rolf Fabian Gunnar Farnebäck | |
305 Stephen Fegan Ramon Garcia Fernandez Torsten Finke | |
306 Jose Daniel Munoz Frias Brad Froehle Castor Fu | |
307 Eduardo Gallestey Walter Gautschi Klaus Gebhardt | |
308 Driss Ghaddab Nicolo Giorgetti Michael D. Godfrey | |
309 Michael Goffioul Glenn Golden Tomislav Goles | |
310 Keith Goodman Brian Gough Steffen Groot | |
311 Etienne Grossmann David Grundberg Peter Gustafson | |
312 Kai Habel Patrick Häcker William P. Y. Hadisoeseno | |
313 Jaroslav Hajek Benjamin Hall Kim Hansen | |
314 Søren Hauberg Dave Hawthorne Daniel Heiserer | |
315 Martin Helm Stefan Hepp Jordi Gutiérrez Hermoso | |
316 Yozo Hida Ryan Hinton Roman Hodek | |
317 A. Scottedward Hodel Richard Allan Holcombe Tom Holroyd | |
318 David Hoover Kurt Hornik Christopher Hulbert | |
319 Cyril Humbert Teemu Ikonen Alan W. Irwin | |
320 Geoff Jacobsen Mats Jansson Cai Jianming | |
321 Steven G. Johnson Heikki Junes Matthias Jüschke | |
322 Atsushi Kajita Jarkko Kaleva Mohamed Kamoun | |
323 Lute Kamstra Fotios Kasolis Thomas Kasper | |
324 Joel Keay Mumit Khan Paul Kienzle | |
325 Aaron A. King Arno J. Klaassen Alexander Klein | |
326 Geoffrey Knauth Heine Kolltveit Ken Kouno | |
327 Kacper Kowalik Daniel Kraft Aravindh Krishnamoorthy | |
328 Oyvind Kristiansen Piotr Krzyzanowski Volker Kuhlmann | |
329 Tetsuro Kurita Miroslaw Kwasniak Rafael Laboissiere | |
330 Kai Labusch Claude Lacoursiere Walter Landry | |
331 Bill Lash Dirk Laurie Maurice LeBrun | |
332 Friedrich Leisch Jyh-miin Lin Timo Lindfors | |
333 Benjamin Lindner Ross Lippert David Livings | |
334 Sebastien Loisel Erik de Castro Lopo Massimo Lorenzin | |
335 Emil Lucretiu Hoxide Ma James Macnicol | |
336 Jens-Uwe Mager Rob Mahurin Ricardo Marranita | |
337 Orestes Mas Makoto Matsumoto Tatsuro Matsuoka | |
338 Laurent Mazet G. D. McBain Alexander Mamonov | |
339 Christoph Mayer Júlio Hoffimann Mendes Thorsten Meyer | |
340 Petr Mikulik Stefan Monnier Antoine Moreau | |
341 Kai P. Mueller Hannes Müller Victor Munoz | |
342 Carmen Navarrete Todd Neal Philip Nienhuis | |
343 Al Niessner Rick Niles Takuji Nishimura | |
344 Kai Noda Eric Norum Krzesimir Nowak | |
345 Michael O'Brien Peter O'Gorman Thorsten Ohl | |
346 Arno Onken Luis F. Ortiz Scott Pakin | |
347 Gabriele Pannocchia Sylvain Pelissier Per Persson | |
348 Primozz Peterlin Jim Peterson Danilo Piazzalunga | |
349 Nicholas Piper Elias Pipping Robert Platt | |
350 Hans Ekkehard Plesser Tom Poage Orion Poplawski | |
351 Ondrej Popp Jef Poskanzer Francesco Potortì | |
352 Konstantinos Poulios Jarno Rajahalme James B. Rawlings | |
353 Eric S. Raymond Balint Reczey Joshua Redstone | |
354 Lukas Reichlin Michael Reifenberger Anthony Richardson | |
355 Jason Riedy E. Joshua Rigler Petter Risholm | |
356 Matthew W. Roberts Andrew Ross Mark van Rossum | |
357 Joe Rothweiler Kevin Ruland Kristian Rumberg | |
358 Ryan Rusaw Olli Saarela Toni Saarela | |
359 Juhani Saastamoinen Radek Salac Ben Sapp | |
360 Aleksej Saushev Alois Schlögl Michel D. Schmid | |
361 Julian Schnidder Nicol N. Schraudolph Sebastian Schubert | |
362 Ludwig Schwardt Thomas L. Scofield Daniel J. Sebald | |
363 Dmitri A. Sergatskov Vanya Sergeev Baylis Shanks | |
364 Andriy Shinkarchuck Robert T. Short Joseph P. Skudlarek | |
365 John Smith Julius Smith Shan G. Smith | |
366 Peter L. Sondergaard Joerg Specht Quentin H. Spencer | |
367 Christoph Spiel Richard Stallman Russell Standish | |
368 Brett Stewart Doug Stewart Jonathan Stickel | |
369 Judd Storrs Thomas Stuart Ivan Sutoris | |
370 John Swensen Daisuke Takago Ariel Tankus | |
371 Matthew Tenny Georg Thimm Duncan Temple Lang | |
372 Kris Thielemans Olaf Till Christophe Tournery | |
373 Thomas Treichl Karsten Trulsen Frederick Umminger | |
374 Utkarsh Upadhyay Stefan van der Walt Peter Van Wieren | |
375 James R. Van Zandt Gregory Vanuxem Ivana Varekova | |
376 Thomas Walter Andreas Weber Olaf Weber | |
377 Thomas Weber Rik Wehbring Bob Weigel | |
378 Andreas Weingessel Martin Weiser Michael Weitzel | |
379 David Wells Fook Fah Yap Sean Young | |
380 Michael Zeising Federico Zenith Alex Zvoleff }} | |
381 \only<4->{\item How many users? Thousands? Millions?} | |
382 \end{itemize} | |
383 \end{frame} | |
384 | |
385 \begin{frame} | |
386 \frametitle{From user to developer} | |
387 This is a FAQ | |
388 \pause | |
389 \begin{block}{How can I contribute?} | |
390 \begin{itemize} | |
391 \item Code (obviously) | |
392 \item Money (pay-what-you-need) | |
393 \item Documentation (especially examples) | |
394 \item Wiki maintenance | |
395 \item Help in the mailing list | |
396 \item Bug reporting | |
397 \end{itemize} | |
398 \end{block} | |
399 \pause | |
400 % Stick around this conference if you want to learn more about how to get involved! | |
401 \end{frame} | |
402 | |
403 \begin{frame} | |
404 \frametitle{Student projects} | |
405 \begin{block}{Google Summer of Code } | |
406 \begin{itemize} | |
407 \item GSoC 2011 | |
408 \begin{itemize} | |
409 \item Daniel Kraft, Profiler | |
410 \end{itemize} | |
411 \item GSoC 2012 | |
412 \begin{itemize} | |
413 \item Jacob Dawid, Qt GUI | |
414 \item Max Brister, JIT | |
415 \item Ben Lewis, Lest Squares Spectral Analysis | |
416 \end{itemize} | |
417 \end{itemize} | |
418 \end{block} | |
419 \begin{block}{European Space Agency's Summer of Code in Space} | |
420 \begin{itemize} | |
421 \item SOCIS 2012 | |
422 \begin{itemize} | |
423 \item Wendy Liu, Agora Octave | |
424 \item Andrius Sutas, Instrument-Control | |
425 \end{itemize} | |
426 \end{itemize} | |
427 \end{block} | |
428 \pause | |
429 % Stick around this conference if you want to learn more about how to get involved! | |
430 \end{frame} | |
431 | |
432 \section{Octave and ...} | |
433 \subsection{Octave and Octave-Forge} | |
434 | |
435 \begin{frame}[fragile]{Octave-Forge} | |
436 \begin{block}{Octave-Forge} | |
437 \href{http://octave.sf.net}{Octave Forge} Is a place for concurrently developing and distributing | |
438 extension packages for Octave. | |
439 \end{block} | |
440 \begin{itemize} | |
441 \item Each package has a \emph{maintainer} responsible for updating and releasing new versions of the package | |
442 \item Some packages are maintained by \emph{The Community} | |
443 \item Installation via an integrated \emph{package manager} | |
444 \end{itemize} | |
445 \end{frame} | |
446 | |
447 \begin{frame}[fragile]{PKG} | |
448 \begin{lstlisting}[keywordstyle=] | |
449 >> pkg install -forge miscellaneous | |
450 For information about changes from previous versions of the miscellaneous package, run: news ("miscellaneous"). | |
451 >> pkg list | |
452 Package Name | Version | Installation directory | |
453 ---------------------+---------+----------------------- | |
454 bim | 1.1.1 | ~/octave/bim-1.1.1 | |
455 fpl | 1.3.3 | ~/octave/fpl-1.3.3 | |
456 general | 1.3.1 | ~/octave/general-1.3.1 | |
457 geometry | 1.6.0 | ~/octave/geometry-1.6.0 | |
458 miscellaneous | 1.2.0 | ~/octave/miscellaneous-1.2.0 | |
459 >> pkg load miscellaneous | |
460 >> pkg list | |
461 Package Name | Version | Installation directory | |
462 ---------------------+---------+----------------------- | |
463 bim | 1.1.1 | ~/octave/bim-1.1.1 | |
464 fpl | 1.3.3 | ~/octave/fpl-1.3.3 | |
465 general | 1.3.1 | ~/octave/general-1.3.1 | |
466 geometry | 1.6.0 | ~/octave/geometry-1.6.0 | |
467 miscellaneous *| 1.2.0 | ~/octave/miscellaneous-1.2.0 | |
468 \end{lstlisting} | |
469 \end{frame} | |
470 | |
471 \begin{frame}[fragile]{PKG} | |
472 \begin{lstlisting}[keywordstyle=] | |
473 >> pkg describe bim -verbose | |
474 --- | |
475 Package name: | |
476 bim | |
477 Version: | |
478 1.1.1 | |
479 Short description: | |
480 Package for solving Diffusion Advection Reaction (DAR) Partial Differential Equations | |
481 Status: | |
482 Not loaded | |
483 --- | |
484 Provides: | |
485 Matrix assembly | |
486 bim1a_advection_diffusion | |
487 bim1a_advection_upwind | |
488 bim2a_advection_diffusion | |
489 ... | |
490 Pre-processing and Post-processing computations | |
491 bim2c_mesh_properties | |
492 ... | |
493 >> | |
494 \end{lstlisting} | |
495 \end{frame} | |
496 | |
497 \begin{frame}[fragile]{Some interesting packages} | |
498 \only<1>{\includegraphics[width=.9\linewidth]{bim}} | |
499 \only<2>{\includegraphics[width=.9\linewidth]{msh}} | |
500 \only<3>{\includegraphics[width=.9\linewidth]{fpl}} | |
501 | |
502 \href{http://wiki.octave.org/Bim_package}{usage examples in the wiki} | |
503 \end{frame} | |
504 | |
505 \subsection{Octave and Matlab} | |
506 \begin{frame}[fragile]{Broadcasting} | |
507 \begin{itemize} | |
508 \item Since 3.6.0, Octave automatically broadcasts arrays when using elementwise binary operators. | |
509 \item Corresponding array dimensions must either be equal or, one of them must be 1. | |
510 \item In case all dimensions are equal, ordinary element-by-element arithmetic takes place. | |
511 \item When one of the dimensions is 1, the array with that singleton dimension gets copied along | |
512 that dimension until it matches the dimension of the other array. | |
513 \end{itemize} | |
514 | |
515 \end{frame} | |
516 | |
517 \begin{frame}[fragile]{Broadcasting} | |
518 \scriptsize | |
519 \begin{lstlisting}[keywordstyle=] | |
520 x = [1 2 3; 4 5 6; 7 8 9]; | |
521 y = [10 20 30]; | |
522 x + y | |
523 11 22 33 | |
524 14 25 36 | |
525 17 28 39 | |
526 \end{lstlisting} | |
527 \begin{itemize} | |
528 \item Without broadcasting, x + y would be an error because dimensions do not agree. | |
529 \item With broadcasting it is as if the following operation were performed | |
530 \end{itemize} | |
531 \scriptsize | |
532 \begin{lstlisting}[keywordstyle=] | |
533 x = [1 2 3;4 5 6;7 8 9]; | |
534 y = [10 20 30; 10 20 30; 10 20 30]; | |
535 x + y | |
536 11 22 33 | |
537 14 25 36 | |
538 17 28 39 | |
539 \end{lstlisting} | |
540 \href{http://wiki.octave.org/FAQ#How_is_Octave_different_from_Matlab.3F}{Other notable differences with Matlab, listed in the wiki} | |
541 \end{frame} | |
542 \subsection{Octave and C++} | |
543 | |
544 \begin{frame}[fragile]{dld-functions} | |
545 Implement an Octave interpreter function in C++ | |
546 \vspace*{-4mm} | |
547 \only<1>{\lstinputlisting[language=C++,linerange=1-15,firstnumber=1]{./examples/dld.cc}} | |
548 \only<2>{\lstinputlisting[language=C++,linerange=16-30,firstnumber=last]{./examples/dld.cc}} | |
549 \only<3>{\lstinputlisting[keywordstyle=]{./examples/dld_run.txt}} | |
550 \vspace*{-4mm} | |
551 \attachfile[icon=Paperclip]{./examples/dld.cc}{source code of the example} | |
552 \end{frame} | |
553 | |
554 \begin{frame}[fragile]{liboctave} | |
555 Use Octave's Matrix/Array Classes in a C++ application | |
556 \vspace*{-4mm} | |
557 \only<1>{\lstinputlisting[language=C++]{./examples/standalone.cc}} | |
558 \only<2>{\lstinputlisting[keywordstyle=]{./examples/standalone_run.txt}} | |
559 \vspace*{-4mm} | |
560 \attachfile[icon=Paperclip]{./examples/standalone.cc}{source code of the example} | |
561 \end{frame} | |
562 | |
563 \begin{frame}[fragile]{Embedding Octave} | |
564 You can embed the Octave interpreter in your C++ application | |
565 \only<1>{\lstinputlisting[language=C++,linerange=1-17,firstnumber=1]{./examples/embedded.cc}} | |
566 \only<2>{\lstinputlisting[language=C++,linerange=18-29,firstnumber=last]{./examples/embedded.cc}} | |
567 \pause | |
568 \attachfile[icon=Paperclip]{./examples/embedded.cc}{source code of the example} | |
569 \end{frame} | |
570 | |
571 \begin{frame}[fragile]{An advanced example} | |
572 Add a new class to the Octave interpreter and work around Octave's pass-by-value semantics\\ | |
573 \attachfile[icon=Paperclip]{./examples/myobject.cc}{source code of the example (.cc)}\\ | |
574 \attachfile[icon=Paperclip]{./examples/myobject.h}{source code of the example (.h)} | |
575 \end{frame} | |
576 | |
577 | |
578 \subsection{Octave and Parallel Computing} | |
579 | |
580 \begin{frame}[fragile]{parcellfun and pararrayfun} | |
581 \scriptsize | |
582 Parcellfun is distributed in the package ``general'' it implements parallelization via {\tt fork ()} and {\tt pipe ()} | |
583 \vspace*{-2mm} | |
584 \only<1>{\lstinputlisting[language=Octave,linerange=34-51,firstnumber=1]{./examples/parcellfun_example.m}} | |
585 \only<2>{\lstinputlisting[language=Octave,linerange=61-76,firstnumber=1]{./examples/parcellfun_example.m}} | |
586 \vspace*{-4mm} | |
587 \attachfile[icon=Paperclip]{./examples/parcellfun_example.m}{source code of the example} | |
588 \end{frame} | |
589 | |
590 \begin{frame}[fragile]{openmpi\_ext} | |
591 \scriptsize | |
592 The package {\tt openmpi\_ext} provides wrappers for the main MPI functions in {\tt openmpi} | |
593 \vspace*{-4mm} | |
594 \only<1>{\includegraphics[width=.9\linewidth]{openmpi_ext}} | |
595 \only<2>{\lstinputlisting[language=Octave,firstnumber=1]{./examples/Pi.m}} | |
596 \only<3>{\lstinputlisting[language=Octave,firstnumber=1]{./examples/Pi_run.txt}} | |
597 \vspace*{-4mm} | |
598 \attachfile[icon=Paperclip]{./examples/parcellfun_example.m}{source code of the example} | |
599 \end{frame} | |
600 | |
601 % | |
602 %\subsection{Octave and LifeV} | |
603 %\frame{} | |
604 % | |
605 % | |
606 | |
607 \end{document} |