Mercurial > hg > what-is-octave
view 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 |
line wrap: on
line source
\documentclass[10pt]{beamer} \usetheme{Octave} \usepackage{thumbpdf} \usepackage{wasysym} \usepackage{ucs} \usepackage[utf8]{inputenc} \usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade} \usepackage{verbatim} \usepackage{listings} \usepackage{attachfile} \lstset{ language=C++, keywordstyle=\bfseries\ttfamily\color[rgb]{0,0,1}, identifierstyle=\ttfamily, commentstyle=\color[rgb]{0.133,0.545,0.133}, stringstyle=\ttfamily\color[rgb]{0.627,0.126,0.941}, showstringspaces=false, basicstyle=\scriptsize, numberstyle=\tiny, numbers=left, stepnumber=1, numbersep=10pt, tabsize=2, breaklines=true, prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}}, breakatwhitespace=false, aboveskip={1.5\baselineskip}, columns=fixed, upquote=true, extendedchars=true, } %\pdfinfo %{ % /Title (What is Octave?) % /Creator (TeX) % /Author (Jordi Guti\'errez Hermoso) %} \title{GNU Octave\\ A free high-level tool for Scientific Computing} \author[cdf, jgh]{{\bf Carlo de Falco}, Jordi Guti\'errez Hermoso} \begin{document} \frame[plain]{\titlepage} \section*{} \begin{frame} \frametitle{Outline} \tableofcontents[section=2] \end{frame} \AtBeginSection[] {\frame<handout:0>{\frametitle{Outline}\tableofcontents[currentsection]}} \AtBeginSubsection[] {\frame<handout:0>{\frametitle{Outline}\tableofcontents[sectionstyle=show/hide,subsectionstyle=show/shaded/hide]}} \newcommand<>{\highlighton}[1]{% \alt#2{\structure{#1}}{{#1}}} \newcommand{\icon}[1]{\pgfimage[height=1em]{#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%% Content starts here %%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{What is Octave?} \subsection{Definition} \begin{frame} \frametitle{What is Octave?} \begin{block}{Octave} {\it ``A \underline{free} \only<1->{\footnote{``free'' = ``libero'' $\neq$ ``gratis''}} numerical environment mostly compatible with \sc{Matlab}''}\\[3mm] \begin{itemize} \item What is compatibility? A point of much debate... \item If it works in {\sc{Matlab}}, it should work in Octave. \item If it breaks it is considered a bug. \item If it works in Octave, it can break in {\sc{Matlab}}. \end{itemize} \end{block} \end{frame} \begin{frame} \frametitle{Lines of code} The stuff Octave is made of... \pause \begin{block}{Core} \begin{itemize} \item About 600,000 lines of C++ \item About 100,000 lines of m-scripts \item About 50,000 lines of Fortran \end{itemize} \end{block} \pause \begin{block}{Octave-Forge} \begin{itemize} \item About 200,000 lines of C++ \item About 330,000 lines of m-scripts \item About 50,000 lines of Fortran \end{itemize} \end{block} \end{frame} \begin{frame} \frametitle{Features} \begin{block}{Current features} \begin{itemize} \item N-d arrays, linear algebra, sparse matrices \item Nonlinear equations \item Ordinary/Algebraic Differential Equations, \item Image processing, statistics, special functions \item Many more... \end{itemize} \end{block} \begin{block}{Features in development} \begin{itemize} \item GUI \item JIT compiling \item classdef OOP %\item Least squares spectral analysis \end{itemize} \end{block} \end{frame} \begin{frame} \frametitle{What does it look like} \begin{itemize} \item Primarily a CLI interface \only<1>{\begin{figure} \begin{center} \includegraphics[height=.6\textheight]{screenshot} \caption{CLI screenshot}\end{center} \end{figure}} \pause \item Most requested feature: GUI! Will ship with next release (4.0) \pause \only<2->{\begin{figure} \begin{center} \includegraphics[height=.6\textheight]{gui_screenshot.jpg} \caption{Qt based GUI development started as J. Dawid's GSoC2012 project} \end{center} \end{figure}} \end{itemize} \end{frame} \subsection{History} \begin{frame} \frametitle{In the beginning... } \begin{itemize} \item Companion software for chemical reactor textbook by James B. Rawlings and John G. Ekerdt \item John W. Eaton (hereafter, jwe) started coding in 1993 \end{itemize} \pause \begin{block}{Rawlings said...} \begin{quote} \center Why don't you call it ``Octave''? \end{quote} \end{block} \begin{itemize} \item Octave refers to Octave Levenspiel, nothing to do with music ... \end{itemize} \end{frame} \begin{frame} \frametitle{jwe is a lone wolf...} jwe works almost completely alone for first four or five years. \pause \begin{block}{In the very beginning...} \begin{itemize} \item No mailing lists \item No widespread announcements \item No VCS (these were dark times) \end{itemize} \end{block} \end{frame} \begin{frame} \frametitle{Contributions slowly trickle in} \begin{block}{Timeline} \begin{itemize} \item[1989] Planning stages \item[1992] Development begins \item[1993] First public announcement \item[1994] Version 1.0 \item[1996] Version 2.0 \item[1998] Version 2.1 development \item[2004] Version 2.9 in preparation for 3.0 release \item[2007] Version 3.0 major upgrade \item[2010] Version 3.2.4, last before using hg \item[2011] Version 3.4.0 \item[2012] Version 3.6.4 \end{itemize} \end{block} \end{frame} \begin{frame} \frametitle{Contributions slowly trickle in} \begin{block}{Milestones} \begin{itemize} \item[1994] Most of the current basic functionality already in. (Much was written during its first two years!) \pause \item[1995] Structs, {\sc{Matlab}}-style plot() command. \item[1998] Original sparse matrix implementation \item[2001] Octave-Forge's first commit \item[2006] MEX interface in core \item[2007] Implementation of handle graphics, full support for sparse matrices \item[2009] OpenGL plotting \item[2010] -forge option for pkg.m \item[2011] Profiler \item[2012] Nested functions \pause \item[2013?] GUI, JIT compiling \end{itemize} \end{block} \end{frame} \subsection{Community dynamics} \begin{frame} \frametitle{Web resources} \begin{block}{Web pages} \begin{itemize} \item \href{http://www.octave.org/}{Octave website} \item \href{http://octave.sf.net/}{Octave-Forge website} \item \href{http://wiki.octave.org/}{Octave wiki} \end{itemize} \end{block} \begin{block}{Users communication} \begin{itemize} \item \href{https://mailman.cae.wisc.edu/listinfo/help-octave}{Octave users mailing list} \item \href{https://lists.sourceforge.net/lists/listinfo/octave-dev}{Octave-Forge mailing list} \item \href{http://webchat.freenode.net/?channels=octave&uio=MT1mYWxzZSYyPXRydWUmMTI9dHJ1ZQda} {\#octave channel in Freenode} \item \href{http://savannah.gnu.org/bugs/?group=octave}{Savannah bug tracker} \end{itemize} \end{block} \pause \begin{block}{Developers collaboration} \begin{itemize} \item \href{http://hg.savannah.gnu.org/hgweb/octave/shortlog}{Octave Mercurial repository} \item \href{http://sourceforge.net/p/octave/code}{Octave-Forge Subversion repository} \end{itemize} \end{block} \end{frame} \begin{frame} \frametitle{Social structure} \begin{itemize} \item Like all free projects, every user is a potential developer. \item 15 current Core developers (with write access to repo) \only<1>{\begin{figure} \centering \includegraphics[width=.5\linewidth]{Core-developers} \end{figure}} \only<2->{\item 49 currently registered 'Forge developers (38 active)} \only<2>{\begin{figure} \centering \includegraphics[width=.6\linewidth]{Forge-developers} \end{figure}} \only<3->{\item 296 total contributors over all time\\} {\only<3>{\fontsize{1}{.1}\selectfont Ben Abbott Andy Adler Giles Anderson Joel Andersson Muthiah Annamalai Marco Atzeri Shai Ayal Roger Banks Ben Barrowes Alexander Barth David Bateman Heinz Bauschke Roman Belov Karl Berry David Billinghurst Don Bindner Jakub Bogusz Moritz Borgmann Paul Boven Richard Bovey John Bradshaw Marcus Brinkmann Remy Bruno Ansgar Burchard Marco Caliari Daniel Calvelo John C. Campbell Juan Pablo Carbajal Jean-Francois Cardoso Joao Cardoso Larrie Carr David Castelow Vincent Cautaerts Clinton Chee Albert Chin-A-Young Carsten Clark J. D. Cole Martin Costabel Michael Creel Jeff Cunningham Martin Dalecki Jorge Barros de Abreu Carlo de Falco Jacob Dawid Thomas D. Dean Philippe Defert Bill Denney Fabian Deutsch Christos Dimitrakakis David M. Doolin Carnë Draug Pascal A. Dupuis John W. Eaton Dirk Eddelbuettel Pieter Eendebak Paul Eggert Stephen Eglen Peter Ekberg Rolf Fabian Gunnar Farnebäck Stephen Fegan Ramon Garcia Fernandez Torsten Finke Jose Daniel Munoz Frias Brad Froehle Castor Fu Eduardo Gallestey Walter Gautschi Klaus Gebhardt Driss Ghaddab Nicolo Giorgetti Michael D. Godfrey Michael Goffioul Glenn Golden Tomislav Goles Keith Goodman Brian Gough Steffen Groot Etienne Grossmann David Grundberg Peter Gustafson Kai Habel Patrick Häcker William P. Y. Hadisoeseno Jaroslav Hajek Benjamin Hall Kim Hansen Søren Hauberg Dave Hawthorne Daniel Heiserer Martin Helm Stefan Hepp Jordi Gutiérrez Hermoso Yozo Hida Ryan Hinton Roman Hodek A. Scottedward Hodel Richard Allan Holcombe Tom Holroyd David Hoover Kurt Hornik Christopher Hulbert Cyril Humbert Teemu Ikonen Alan W. Irwin Geoff Jacobsen Mats Jansson Cai Jianming Steven G. Johnson Heikki Junes Matthias Jüschke Atsushi Kajita Jarkko Kaleva Mohamed Kamoun Lute Kamstra Fotios Kasolis Thomas Kasper Joel Keay Mumit Khan Paul Kienzle Aaron A. King Arno J. Klaassen Alexander Klein Geoffrey Knauth Heine Kolltveit Ken Kouno Kacper Kowalik Daniel Kraft Aravindh Krishnamoorthy Oyvind Kristiansen Piotr Krzyzanowski Volker Kuhlmann Tetsuro Kurita Miroslaw Kwasniak Rafael Laboissiere Kai Labusch Claude Lacoursiere Walter Landry Bill Lash Dirk Laurie Maurice LeBrun Friedrich Leisch Jyh-miin Lin Timo Lindfors Benjamin Lindner Ross Lippert David Livings Sebastien Loisel Erik de Castro Lopo Massimo Lorenzin Emil Lucretiu Hoxide Ma James Macnicol Jens-Uwe Mager Rob Mahurin Ricardo Marranita Orestes Mas Makoto Matsumoto Tatsuro Matsuoka Laurent Mazet G. D. McBain Alexander Mamonov Christoph Mayer Júlio Hoffimann Mendes Thorsten Meyer Petr Mikulik Stefan Monnier Antoine Moreau Kai P. Mueller Hannes Müller Victor Munoz Carmen Navarrete Todd Neal Philip Nienhuis Al Niessner Rick Niles Takuji Nishimura Kai Noda Eric Norum Krzesimir Nowak Michael O'Brien Peter O'Gorman Thorsten Ohl Arno Onken Luis F. Ortiz Scott Pakin Gabriele Pannocchia Sylvain Pelissier Per Persson Primozz Peterlin Jim Peterson Danilo Piazzalunga Nicholas Piper Elias Pipping Robert Platt Hans Ekkehard Plesser Tom Poage Orion Poplawski Ondrej Popp Jef Poskanzer Francesco Potortì Konstantinos Poulios Jarno Rajahalme James B. Rawlings Eric S. Raymond Balint Reczey Joshua Redstone Lukas Reichlin Michael Reifenberger Anthony Richardson Jason Riedy E. Joshua Rigler Petter Risholm Matthew W. Roberts Andrew Ross Mark van Rossum Joe Rothweiler Kevin Ruland Kristian Rumberg Ryan Rusaw Olli Saarela Toni Saarela Juhani Saastamoinen Radek Salac Ben Sapp Aleksej Saushev Alois Schlögl Michel D. Schmid Julian Schnidder Nicol N. Schraudolph Sebastian Schubert Ludwig Schwardt Thomas L. Scofield Daniel J. Sebald Dmitri A. Sergatskov Vanya Sergeev Baylis Shanks Andriy Shinkarchuck Robert T. Short Joseph P. Skudlarek John Smith Julius Smith Shan G. Smith Peter L. Sondergaard Joerg Specht Quentin H. Spencer Christoph Spiel Richard Stallman Russell Standish Brett Stewart Doug Stewart Jonathan Stickel Judd Storrs Thomas Stuart Ivan Sutoris John Swensen Daisuke Takago Ariel Tankus Matthew Tenny Georg Thimm Duncan Temple Lang Kris Thielemans Olaf Till Christophe Tournery Thomas Treichl Karsten Trulsen Frederick Umminger Utkarsh Upadhyay Stefan van der Walt Peter Van Wieren James R. Van Zandt Gregory Vanuxem Ivana Varekova Thomas Walter Andreas Weber Olaf Weber Thomas Weber Rik Wehbring Bob Weigel Andreas Weingessel Martin Weiser Michael Weitzel David Wells Fook Fah Yap Sean Young Michael Zeising Federico Zenith Alex Zvoleff }} \only<4->{\item How many users? Thousands? Millions?} \end{itemize} \end{frame} \begin{frame} \frametitle{From user to developer} This is a FAQ \pause \begin{block}{How can I contribute?} \begin{itemize} \item Code (obviously) \item Money (pay-what-you-need) \item Documentation (especially examples) \item Wiki maintenance \item Help in the mailing list \item Bug reporting \end{itemize} \end{block} \pause % Stick around this conference if you want to learn more about how to get involved! \end{frame} \begin{frame} \frametitle{Student projects} \begin{block}{Google Summer of Code } \begin{itemize} \item GSoC 2011 \begin{itemize} \item Daniel Kraft, Profiler \end{itemize} \item GSoC 2012 \begin{itemize} \item Jacob Dawid, Qt GUI \item Max Brister, JIT \item Ben Lewis, Lest Squares Spectral Analysis \end{itemize} \end{itemize} \end{block} \begin{block}{European Space Agency's Summer of Code in Space} \begin{itemize} \item SOCIS 2012 \begin{itemize} \item Wendy Liu, Agora Octave \item Andrius Sutas, Instrument-Control \end{itemize} \end{itemize} \end{block} \pause % Stick around this conference if you want to learn more about how to get involved! \end{frame} \section{Octave and ...} \subsection{Octave and Octave-Forge} \begin{frame}[fragile]{Octave-Forge} \begin{block}{Octave-Forge} \href{http://octave.sf.net}{Octave Forge} Is a place for concurrently developing and distributing extension packages for Octave. \end{block} \begin{itemize} \item Each package has a \emph{maintainer} responsible for updating and releasing new versions of the package \item Some packages are maintained by \emph{The Community} \item Installation via an integrated \emph{package manager} \end{itemize} \end{frame} \begin{frame}[fragile]{PKG} \begin{lstlisting}[keywordstyle=] >> pkg install -forge miscellaneous For information about changes from previous versions of the miscellaneous package, run: news ("miscellaneous"). >> pkg list Package Name | Version | Installation directory ---------------------+---------+----------------------- bim | 1.1.1 | ~/octave/bim-1.1.1 fpl | 1.3.3 | ~/octave/fpl-1.3.3 general | 1.3.1 | ~/octave/general-1.3.1 geometry | 1.6.0 | ~/octave/geometry-1.6.0 miscellaneous | 1.2.0 | ~/octave/miscellaneous-1.2.0 >> pkg load miscellaneous >> pkg list Package Name | Version | Installation directory ---------------------+---------+----------------------- bim | 1.1.1 | ~/octave/bim-1.1.1 fpl | 1.3.3 | ~/octave/fpl-1.3.3 general | 1.3.1 | ~/octave/general-1.3.1 geometry | 1.6.0 | ~/octave/geometry-1.6.0 miscellaneous *| 1.2.0 | ~/octave/miscellaneous-1.2.0 \end{lstlisting} \end{frame} \begin{frame}[fragile]{PKG} \begin{lstlisting}[keywordstyle=] >> pkg describe bim -verbose --- Package name: bim Version: 1.1.1 Short description: Package for solving Diffusion Advection Reaction (DAR) Partial Differential Equations Status: Not loaded --- Provides: Matrix assembly bim1a_advection_diffusion bim1a_advection_upwind bim2a_advection_diffusion ... Pre-processing and Post-processing computations bim2c_mesh_properties ... >> \end{lstlisting} \end{frame} \begin{frame}[fragile]{Some interesting packages} \only<1>{\includegraphics[width=.9\linewidth]{bim}} \only<2>{\includegraphics[width=.9\linewidth]{msh}} \only<3>{\includegraphics[width=.9\linewidth]{fpl}} \href{http://wiki.octave.org/Bim_package}{usage examples in the wiki} \end{frame} \subsection{Octave and Matlab} \begin{frame}[fragile]{Broadcasting} \begin{itemize} \item Since 3.6.0, Octave automatically broadcasts arrays when using elementwise binary operators. \item Corresponding array dimensions must either be equal or, one of them must be 1. \item In case all dimensions are equal, ordinary element-by-element arithmetic takes place. \item When one of the dimensions is 1, the array with that singleton dimension gets copied along that dimension until it matches the dimension of the other array. \end{itemize} \end{frame} \begin{frame}[fragile]{Broadcasting} \scriptsize \begin{lstlisting}[keywordstyle=] x = [1 2 3; 4 5 6; 7 8 9]; y = [10 20 30]; x + y 11 22 33 14 25 36 17 28 39 \end{lstlisting} \begin{itemize} \item Without broadcasting, x + y would be an error because dimensions do not agree. \item With broadcasting it is as if the following operation were performed \end{itemize} \scriptsize \begin{lstlisting}[keywordstyle=] x = [1 2 3;4 5 6;7 8 9]; y = [10 20 30; 10 20 30; 10 20 30]; x + y 11 22 33 14 25 36 17 28 39 \end{lstlisting} \href{http://wiki.octave.org/FAQ#How_is_Octave_different_from_Matlab.3F}{Other notable differences with Matlab, listed in the wiki} \end{frame} \subsection{Octave and C++} \begin{frame}[fragile]{dld-functions} Implement an Octave interpreter function in C++ \vspace*{-4mm} \only<1>{\lstinputlisting[language=C++,linerange=1-15,firstnumber=1]{./examples/dld.cc}} \only<2>{\lstinputlisting[language=C++,linerange=16-30,firstnumber=last]{./examples/dld.cc}} \only<3>{\lstinputlisting[keywordstyle=]{./examples/dld_run.txt}} \vspace*{-4mm} \attachfile[icon=Paperclip]{./examples/dld.cc}{source code of the example} \end{frame} \begin{frame}[fragile]{liboctave} Use Octave's Matrix/Array Classes in a C++ application \vspace*{-4mm} \only<1>{\lstinputlisting[language=C++]{./examples/standalone.cc}} \only<2>{\lstinputlisting[keywordstyle=]{./examples/standalone_run.txt}} \vspace*{-4mm} \attachfile[icon=Paperclip]{./examples/standalone.cc}{source code of the example} \end{frame} \begin{frame}[fragile]{Embedding Octave} You can embed the Octave interpreter in your C++ application \only<1>{\lstinputlisting[language=C++,linerange=1-17,firstnumber=1]{./examples/embedded.cc}} \only<2>{\lstinputlisting[language=C++,linerange=18-29,firstnumber=last]{./examples/embedded.cc}} \pause \attachfile[icon=Paperclip]{./examples/embedded.cc}{source code of the example} \end{frame} \begin{frame}[fragile]{An advanced example} Add a new class to the Octave interpreter and work around Octave's pass-by-value semantics\\ \attachfile[icon=Paperclip]{./examples/myobject.cc}{source code of the example (.cc)}\\ \attachfile[icon=Paperclip]{./examples/myobject.h}{source code of the example (.h)} \end{frame} \subsection{Octave and Parallel Computing} \begin{frame}[fragile]{parcellfun and pararrayfun} \scriptsize Parcellfun is distributed in the package ``general'' it implements parallelization via {\tt fork ()} and {\tt pipe ()} \vspace*{-2mm} \only<1>{\lstinputlisting[language=Octave,linerange=34-51,firstnumber=1]{./examples/parcellfun_example.m}} \only<2>{\lstinputlisting[language=Octave,linerange=61-76,firstnumber=1]{./examples/parcellfun_example.m}} \vspace*{-4mm} \attachfile[icon=Paperclip]{./examples/parcellfun_example.m}{source code of the example} \end{frame} \begin{frame}[fragile]{openmpi\_ext} \scriptsize The package {\tt openmpi\_ext} provides wrappers for the main MPI functions in {\tt openmpi} \vspace*{-4mm} \only<1>{\includegraphics[width=.9\linewidth]{openmpi_ext}} \only<2>{\lstinputlisting[language=Octave,firstnumber=1]{./examples/Pi.m}} \only<3>{\lstinputlisting[language=Octave,firstnumber=1]{./examples/Pi_run.txt}} \vspace*{-4mm} \attachfile[icon=Paperclip]{./examples/parcellfun_example.m}{source code of the example} \end{frame} % %\subsection{Octave and LifeV} %\frame{} % % \end{document}