https://wiki.octave.org/wiki/api.php?action=feedcontributions&user=109.205.67.254&feedformat=atomOctave - User contributions [en]2021-02-27T07:14:17ZUser contributionsMediaWiki 1.35.1https://wiki.octave.org/wiki/index.php?title=FAQ&diff=5256FAQ2015-01-06T22:46:51Z<p>109.205.67.254: /* What's new in version series 3.6.N and 3.7.N of Octave */</p>
<hr />
<div>This is a list of frequently asked questions (FAQ) for GNU Octave users.<br />
<br />
We are always looking for new questions (with answers), better answers, or both. Feel free to edit this page with your changes. If you have general questions about GNU Octave, or need help for something that is not covered by the Octave manual or the FAQ, please use the [https://mailman.cae.wisc.edu/listinfo/help-octave help@octave.org mailing list].<br />
<br />
This FAQ is intended to supplement, not replace, the GNU Octave manual. Before posting a question to the [https://mailman.cae.wisc.edu/listinfo/help-octave help@octave.org mailing list], you should first check to see if the topic is covered in the manual.<br />
<br />
=General=<br />
<br />
==What is Octave?==<br />
<br />
GNU Octave is a high-level interactive language, primarily intended for numerical computations, that is mostly compatible with Matlab.<br />
<br />
GNU Octave can do arithmetic for real, complex or integer-valued scalars and matrices, solve sets of nonlinear algebraic equations, integrate functions over finite and infinite intervals, and integrate systems of ordinary differential and differential-algebraic equations.<br />
<br />
GNU Octave uses the GNU readline library to handle reading and editing input. By default, the line editing commands are similar to the cursor movement commands used by GNU Emacs, and a vi-style line editing interface is also available. At the end of each session, the command history is saved, so that commands entered during previous sessions are not lost.<br />
<br />
The GNU Octave distribution includes a 650+ page Texinfo manual. Access to the complete text of the manual is available via the doc command at the GNU Octave prompt.<br />
<br />
==What is Octave-Forge?==<br />
[http://octave.sourceforge.net/ Octave-Forge] is a collection of packages for GNU Octave, something similar to the Matlab toolboxes. When talking about the two projects at the same time, GNU Octave is usually referred to as Octave core (or just ''core''). [http://octave.sourceforge.net/ Octave-Forge] also serves as a test bed for code that may eventually end up in the core, and distributes binaries for systems with a lack of developers tools (mainly Windows).<br />
<br />
==Who uses Octave?==<br />
<br />
Lots of people. It seems that universities use it for research and teaching, companies of all sizes, for development, individuals. This question comes often on Octave mailing lists, see [[Who Uses Octave?]] for a few answers<br />
<br />
==Who develops Octave?==<br />
<br />
Discussions about writing the software that would eventually become Octave started in about 1988 with James B. Rawlings and John W. Eaton at the University of Texas. John W. Eaton was the original author of Octave, starting full-time development in February 1992. He is still the primary maintainer. The community of users/developers has in addition contributed some code and fuels the discussion on the mailing lists help@octave.org (user forum), maintainers@octave.org (development issues).<br />
<br />
==Why "Octave"?==<br />
<br />
Octave's name has nothing to do with music. It's named after [http://en.wikipedia.org/wiki/Octave_Levenspiel Octave Levenspiel], a former professor of John who was famous for his ability to do quick back-of-the-envelope calculations. You can hear John pronounce the name "Octave" a few times [http://videolectures.net/mloss08_eaton_oct/ in this video]. We hope that GNU Octave will help perform computations with the same ease as Dr. Levenspiel.<br />
<br />
==Why <em>GNU</em> Octave?==<br />
<br />
The GNU Project was launched in 1984 to develop a complete Unix-like operating system which is free software: the GNU system.<br />
<br />
GNU is a recursive acronym for “GNU's Not Unix”; it is pronounced guh-noo, approximately like canoe.<br />
<br />
The Free Software Foundation (FSF) is the principal organizational sponsor of the GNU Project.<br />
<br />
Octave became GNU Octave in 1997 (beginning with version 2.0.6). This meant agreeing to consider Octave a part of the GNU Project and support the efforts of the FSF. A big part of this effort is to adhere to the [http://www.gnu.org/prep/standards/standards.html GNU coding standards] and to benefit from GNU's infrastructure (e.g. [http://hg.savannah.gnu.org/hgweb/octave/ code hosting] and [http://bugs.octave.org bug tracking]). Additionally, Octave receives [https://my.fsf.org/donate/working-together/octave sponsorship] from the FSF's Working Together fund. However, Octave is not and has never been developed by the FSF.<br />
<br />
For more information about the GNU project, see http://www.gnu.org.<br />
<br />
==What version should I use?==<br />
<br />
In general, you will find the latest version on http://www.octave.org/download.html. It is recommended to use the stable version of octave for general use, and the development version if you want the latest features and are willing to tolerate instability.<br />
<br />
A list of user-visible changes since the last release is available in the file NEWS. The file ChangeLog in the source distribution contains a more detailed record of changes made since the last release.<br />
<br />
==On what platforms does Octave run?==<br />
<br />
Octave runs on various Unices—at least Linux and Solaris, Mac OS X, Windows and anything you can compile it on. Binary distributions exist at least for Debian, SUSE, Fedora and RedHat Linuxes (Intel and AMD CPUs, at least), for Mac OS X and Windows' 98, 2000, XP, Vista, and 7.<br />
<br />
Two and three dimensional plotting is fully supported using gnuplot and an experimental OpenGL backend.<br />
<br />
The underlying numerical solvers are currently standard Fortran ones like LAPACK, LINPACK, ODEPACK, the BLAS, etc., packaged in a library of C++ classes. If possible, the Fortran subroutines are compiled with the system's Fortran compiler, and called directly from the C++ functions. If that's not possible, you can still compile Octave if you have the free Fortran to C translator f2c.<br />
<br />
Octave is also free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation, or at your option any later version.<br />
<br />
==Why are the developers planning to replace Gnuplot with an OpenGL backend?==<br />
<br />
The development of Octave is committed to being both compatible with Matlab and adding additional features. Toward those ends, the development community has chosen to introduce a native OpenGL backend that supports Matlab handle graphics and its uicontrols. Starting with the 3.8 release, Octave now uses OpenGL graphics by default with FLTK widgets. A Qt OpenGL toolkit is also [https://github.com/goffioul/QtHandles under development].<br />
<br />
There are no plans to remove the gnuplot backend. While a better backend may some day become the new default plotter, the gnuplot backend will still be available as long as our users find it useful.<br />
<br />
==How can I cite Octave?==<br />
<br />
Pointing to http://www.octave.org is good, because that gives people a direct way to find out more. If citation of a URL is allowed by the publisher you can use this entry (update year and version accordingly!):<br />
<br />
<nowiki>@MISC{octave:2014,<br />
author = {{Octave community}},<br />
keywords = {Octave,Software},<br />
title = {{GNU Octave 3.8.1}},<br />
url = {www.gnu.org/software/octave/},<br />
year = {2014}<br />
}</nowiki><br />
<br />
if you also want to point to a traditional reference, then you can cite the Octave manual:<br />
<br />
<nowiki>@BOOK{eaton:2009,<br />
author = {John W. Eaton and David Bateman and S\oren Hauberg},<br />
title = {{GNU Octave} version 3.0.1 manual: a high-level interactive language for numerical computations},<br />
publisher = {CreateSpace Independent Publishing Platform},<br />
year = {2009},<br />
note = {{ISBN} 1441413006},<br />
url = {http://www.gnu.org/software/octave/doc/interpreter},<br />
}</nowiki><br />
<br />
<br />
If you want to acknowledge Octave instead of citing it, you can use text such as this:<br />
<br />
<blockquote><br />
The data has been numerically analyzed with the free software package GNU Octave.<br />
</blockquote><br />
<br />
or<br />
<br />
<blockquote><br />
This work made use of the free software package GNU Octave, and the authors are grateful for the support of the Octave development community.<br />
</blockquote><br />
<br />
==When will feature X be released or implemented?==<br />
When it's ready, sooner if you help. Send us patches if you can. We like patches. If you can't, some developers may be convinced to work on your specific problem for some money.<br />
<br />
==How can I get involved in Octave development?==<br />
<br />
Be around. Be social. Participate in the [https://mailman.cae.wisc.edu/listinfo/help-octave help] and [https://mailman.cae.wisc.edu/listinfo/octave-maintainers maintainers] mailing lists. Find things about Octave you don't like, and start thinking about how to fix them. Many people who now contribute to Octave first spent several years helping in the mailing list before they started to delve into the code. A good way to learn Octave is to understand the problems other people are having with it, so being helpful in the mailing lists not only helps Octave as a whole, but it also prepares you to be a better Octave contributor.<br />
<br />
If you feel ready to dive right into the code, read [[Hacking | here]] and [http://www.gnu.org/software/octave/get-involved.html here] for guidance. One of the best ways for understanding how Octave works is to [[Debugging Octave|run it in a debugger]].<br />
<br />
We also need help with this wiki and the [http://www.gnu.org/software/octave/doc/interpreter/ manual]. These are also important tasks. The documentation is easier to patch, so you can discuss improvements to it and submit patches. Or just edit this wiki! <br />
<br />
Accurate bug reporting is also very useful. Find and report [http://www.gnu.org/software/octave/bugs.html bugs], making an attempt to diagnose them. Eventually, you will also know how to fix them. If you want to help with bug reports or patches, subscribe to [https://savannah.gnu.org/mail/?group=octave the bug tracker mailing list]. You'll get updates on all bug activity, and you can jump in when you see something you can help with.<br />
<br />
Look at our [[Projects]] and [[Summer of Code Project Ideas]] if you need specific inspiration for coding tasks that we would like to get done. See also the list of [[short projects]].<br />
<br />
=Licensing issues=<br />
<br />
==If I write code using Octave do I have to release it under the GPL?==<br />
<br />
The answer depends on precisely how the code is written and how it works.<br />
<br />
Code written entirely in the scripting language of Octave (interpreted code in .m files) may be released under the terms of whatever license you choose.<br />
<br />
Code written using Octave's native plug-in interface (also known as a .oct file) necessarily links with Octave internals and is considered a derivative work of Octave and therefore must be released under terms that are compatible with the GPL.<br />
<br />
Code written using Octave's implementation of the Matlab MEX interface may be released under the terms of whatever license you choose, provided that the following conditions are met:<br />
<br />
# The plugin should not use any bindings that are specific to Octave. In other words, the MEX file must use the MEX interface only, and not also call on other Octave internals. It should be possible in principle to use the MEX file with other programs that implement the MEX interface (e.g., Matlab).<br />
# The MEX file should not be distributed together with Octave in such a way that they effectively create a single work. For example, you should not distribute the MEX file and Octave together in a single package such that Octave automatically loads and runs the MEX file when it starts up. There are other possible ways that you might effectively create a single work; this is just one example.<br />
<br />
A program that embeds the Octave interpreter (e.g., by calling the "octave_main" function), or that calls functions from Octave's libraries (e.g., liboctinterp, liboctave, or libcruft) is considered a derivative work of Octave and therefore must be released under terms that are compatible with the GPL.<br />
<br />
==Since the MEX interface allows plugins to be distributed under terms that are incompatible with the GPL, does this mean that you are encouraging people to write non-free software for Octave?==<br />
<br />
No. The original reason for implementing the MEX interface for Octave was to allow Octave to run free software that uses MEX files (the particular goal was to run SundialsTB in Octave). The intent was to liberate that software from Matlab and increase the amount of free software available to Octave users, not to enable people to write proprietary code for Octave. For the good of the community, we strongly encourage users of Octave to release the code they write for Octave under terms that are compatible with the GPL.<br />
<br />
==I wrote a program that links with Octave libraries and I don't want to release it under the terms of the GPL. Will you change the license of the Octave libraries for me?==<br />
<br />
No. Instead of asking us to change the licensing terms for Octave, we recommend that you release your program under terms that are compatible with the GPL so that the free software community can benefit from your work the same as you have benefited from the work of all the people who have contributed to Octave.<br />
<br />
==Why can't I use code from File Exchange in Octave? It's released under a BSD license!==<br />
<br />
When one downloads code from File Exchange and use it on non Mathworks software (such as Octave), they are violating the Matlab central [http://www.mathworks.co.uk/matlabcentral/termsofuse.html Terms of Use]. While the [http://en.wikipedia.org/wiki/BSD_licenses BSD licenses] does allow one to use such code in Octave, it also allows others to further impose restrictions which Mathworks does through the MATLAB Central Terms of Use of their site:<br />
<br />
{{quote|text=Content submitted to File Exchange may only be used with MathWorks products.|sign=Matlab central|source=[http://www.mathworks.co.uk/matlabcentral/termsofuse.html#content Terms of Use 2iii]}}<br />
<br />
It should suffice -- although interpretations of this vary -- to contact the author directly and have them send you the code personally, or download the code from the author's own website, if available.<br />
<br />
If you need that code or think that the code is useful, please write the authors asking them to release under a free license. Some examples of letters/email sent to authors can be found in the page [[Asking_for_package_to_be_released_under_GPL:_examples|Asking for package to be released under GPL: examples]].<br />
<br />
Feel free to remix and reuse, just make sure you use your name!<br />
<br />
=What's new in Octave=<br />
==What's new in version series 3.6.N and 3.7.N of Octave==<br />
<br />
Several new features have been added to the 3.6.N series. The full details are in [https://www.gnu.org/software/octave/NEWS-3.6.html the NEWS file], but in brief 3.6.N series brings:<br />
<br />
* Perl compatible regular expressions<br />
* A profiler has been added.<br />
* Broadcasting enabled for all built-in binary element-wise operators.<br />
* The statistical distribution functions have been overhauled.<br />
* The functions strread(), textscan(), and textread() have been rewritten.<br />
* Performance of all m-file string functions has been improved.<br />
* The qhull geometry functions have been revamped.<br />
* Date/time functions have been updated.<br />
* Matlab compatible preference functions have been added.<br />
* Various handle graphics functions have been introduced.<br />
* The parfor keyword is now recognized.<br />
<br />
==Features added in version series 3.4.N and 3.5.N of Octave==<br />
Here are some features that have been around since 3.4.N<br />
<br />
* Many improvements to native OpenGL plotting<br />
* ARPACK now distributed with Octave<br />
* Indexing optimisations<br />
* FTP object using libcurl<br />
* Better consistency with ismatrix, issquare, and issymetric<br />
* Function handles aware of overloaded functions<br />
* More efficient matrix division by making a single LAPACK call<br />
* Other optimisations in matrix operations<br />
* bsxfun optimised for basic arithmetic functions<br />
* Matlab-style ignoring of output arguments using {{Codeline|~}}<br />
* Many optimisations of the accumarray function<br />
* Sparse matrix indexing has been rewritten for speed<br />
* Configuration pseudo-variables like page_screen_output accept a "local" option argument to limit their scope to function scope<br />
* The pkg command now accepts a -forge option to pull packages directly from Octave-forge<br />
* Several dlmread improvements<br />
* Octave now uses gnulib for better cross-platform compatibility<br />
<br />
==Features added in version series 3.2.N and 3.3.N of Octave==<br />
Here are some features that have been around since 3.2.N<br />
<br />
* integer types<br />
* fixed point arithmetic<br />
* sparse matrices<br />
* linear programming code based on GLPK<br />
* 64-bit compilation support<br />
* gzipped files and stream and consequently support of Matlab v7 files<br />
* better support for both msvc and mingw<br />
* a fully compatible MEX interface<br />
* many many other minor features and compatibility changes<br />
* an experimental OpenGL graphics toolkit to replace gnuplot<br />
* object orient programming<br />
* block comments<br />
* imwrite and imread (based on the GraphicsMagick library)<br />
* Lazy transpose <br/> Special treatment in the parser of things like "a' * b", where the transpose is never explicitly formed but a flag is rather passed to the underlying LAPACK code.<br />
* Single precision type<br />
* Improved array indexing <br/> The underlying code used for indexing of arrays has been completely rewritten and so the indexing of arrays is now significantly faster.<br />
<br />
==Features available since 2.1.N==<br />
Here are some older features that have been around since 2.1.N:<br />
<br />
* NDArrays<br />
* cells<br />
<br />
==Coming in a future release==<br />
See [http://hg.savannah.gnu.org/hgweb/octave/file/tip/NEWS NEWS on the development branch]<br />
<br />
=What documentation exists for Octave?=<br />
<br />
Besides the current wiki, there are other important sources of documentation and help for Octave.<br />
<br />
==What documentation exists for Octave?==<br />
<br />
The Octave distribution includes a 650+ page manual that is also distributed under the terms of the GNU GPL. It is available on the web at http://www.gnu.org/software/octave/doc/interpreter/ and you will also find there instructions on how to order a paper version.<br />
<br />
The complete text of the Octave manual is also available using the GNU Info system via the GNU Emacs, info, or xinfo programs, or by using the {{Codeline|doc}} command to start the GNU info browser directly from the Octave prompt.<br />
<br />
If you have problems using this documentation, or find that some topic is not adequately explained, indexed, or cross-referenced, please report it on http://bugs.octave.org.<br />
<br />
==Getting additional help==<br />
<br />
If you can't find an answer to your question, the help@octave.org mailing list is available for questions related to using, installing, and porting Octave that are not adequately answered by the Octave manual or by this document.<br />
<br />
==User community==<br />
<br />
To subscribe to the list, go to http://www.octave.org/archive.html and follow the link to the subscription page for the list.<br />
<br />
Please do not send requests to be added or removed from the mailing list, or other administrative trivia to the list itself.<br />
<br />
An archive of old postings to the help-octave mailing list is maintained on http://www.octave.org/archive.html.<br />
<br />
You will also find some user advice and code spread over the web. Good starting points are the Octave Wiki http://wiki.octave.org and Octave-Forge http://octave.sourceforge.net<br />
<br />
We also have [http://webchat.freenode.net?channels=octave&uio=d4 an IRC chat room], <code>#octave</code> in Freenode.<br />
<br />
==I think I have found a bug in Octave.==<br />
<br />
“I think I have found a bug in Octave, but I'm not sure. How do I know, and who should I tell?”<br />
<br />
First, see the section [http://www.octave.org/bugs.html on bugs and bug reports in the Octave manual]. When you report a bug, make sure to describe the type of computer you are using, the version of the operating system it is running, and the version of Octave that you are using. Also provide enough code and configuration details of your operating system so that the Octave maintainers can duplicate your bug.<br />
<br />
=How can I obtain Octave?=<br />
<br />
==Source code==<br />
<br />
Source code is available on the Octave development site, where you are sure to get the latest version.<br />
<br />
* http://www.octave.org/download.html<br />
* ftp://ftp.octave.org/pub/octave/<br />
<br />
Since Octave is distributed under the terms of the GPL, you can get Octave from a friend who has a copy, or from the Octave website.<br />
<br />
==Pre-compiled binary packages==<br />
<br />
The Octave project does not distribute binary packages, but other projects do. For an up-to-date listing of packagers, see:<br />
<br />
* http://www.octave.org/download.html<br />
* [[Build From Source]]<br />
<br />
As of today, Octave binaries are available at least on Debian, Ubuntu, RedHat, Suse and Fedora GNU/Linux, Mac OS X, Windows versions 98, 2000, XP, Vista, 7 and 8.<br />
<br />
==How do I get a copy of Octave for (some other platform)?==<br />
<br />
Octave currently runs on Unix-like systems, Mac OS X, and Windows. It should be possible to make Octave work on other systems as well. If you are interested in porting Octave to other systems, please contact [mailto:maintainers@octave.org the maintainers' mailing list]<br />
.<br />
==How can I install Octave on Android? What is this Octave app in the Google Play store?==<br />
<br />
There is an unofficial Octave app available for Android in the Google Play store. Please see [[Android]] for more information.<br />
<br />
=Installation issues and problems= <br />
<br />
Octave 3.4 requires approximately 1.3 GB of disk storage to unpack and compile from source (considerably less if you don't compile with debugging symbols). Once installed, Octave requires approximately 355 MB of disk space (again, considerably less if you don't compile with debugging symbols, approximately 50 MB).<br />
<br />
Check out the page [[Installation]] for more detailed information about installing Octave.<br />
<br />
==What else do I need?==<br />
<br />
To compile Octave, you will need a recent version of GNU Make. You will also need GCC 4.3 or later, although GCC 4.4 or later is recommended.<br />
<br />
'''You must have GNU Make to compile octave'''. Octave's Makefiles use features of GNU Make that are not present in other versions of make. GNU Make is very portable and easy to install.<br />
<br />
==Can I compile Octave with another C++ compiler?==<br />
<br />
Yes, but development is done primarily with GCC, so you may hit some incompatibilities. Octave is intended to be portable to any standard conforming compiler. If you have difficulties that you think are bugs, please report them to the http://bugs.octave.org bug tracker, or ask for help on the [mailto:help@octave.org mailing list].<br />
<br />
== How do I install ''all'' Octave packages? ==<br />
Do not do it! Really, there is no reason to do this. Octave Forge has many packages for different needs but it's unlikely that you need all of them. The common misconception is that the more packages one installs, the more complete and powerful its octave installation will be. However, in the same way one would ''never'' install all perl modules, ruby gems or python packages (because it simply makes no sense), one should not install all octave packages. This isn't desirable and it's not even possible.<br />
<br />
Packages should be installed and loaded selectively. Note that some packages are meant to shadow core functions changing the way Octave works, and different packages can have different implementations of a function with the same name, leading to unpredictable results. Others are just broken or crappy and will break your system. What's worse, some of them packages are even loaded automatically at startup so you may be screwing your octave installation without even realizing it.<br />
<br />
=Coding=<br />
<br />
==What features are unique to Octave?==<br />
<br />
Although most of the Octave language will be familiar to Matlab users, it has some unique features of its own.<br />
<br />
=== Functions defined on the command-line===<br />
Functions can be defined by entering code on the command line, a feature not supported by Matlab. For example, you may type:<br />
<br />
octave:1> function s = hello_string (to_who)<br />
> ## Say hello<br />
> if nargin<1, to_who = "World"; end<br />
> s = ["Hello ",\<br />
> to_who];<br />
> endfunction<br />
octave:2> hello_string ("Moon")<br />
ans = Hello Moon<br />
<br />
As a natural extension of this, functions can also be defined in script files (m-files whose first non-comment line isn't {{Codeline|function out &#61; foo (...)}})<br />
<br />
===Comments with #===<br />
<br />
The pound character, {{Codeline|#}}, may be used to start comments, in addition to {{Codeline|%}}. See the previous example. The major advantage of this is that as {{Codeline|#}} is also a comment character for unix script files, any file that starts with a string like {{Codeline|#! /usr/bin/octave -q}} will be treated as an octave script and be executed by octave.<br />
<br />
===Strings delimited by double quotes "===<br />
<br />
The double quote, {{Codeline|"}}, may be used to delimit strings, in addition to the single quote {{Codeline|'}}. See the previous example. Also, double-quoted strings include backslash interpretation (like C++, C, and Perl) while single quoted are uninterpreted (like Matlab and Perl).<br />
<br />
===Line continuation by backslash===<br />
<br />
Lines can be continued with a backslash, {{Codeline|\}}, in addition to three points {{Codeline|...}}. See the previous example.<br />
<br />
===Informative block closing===<br />
<br />
You may close function, for, while, if, ... blocks with endfunction, endfor, endwhile, ... keywords in addition to using end. As with Matlab, the end (or endfunction) keyword that marks the end of a function defined in a .m file is optional.<br />
<br />
===Coherent syntax===<br />
<br />
Indexing other things than variables is possible, as in:<br />
<br />
octave:1> [3 1 4 1 5 9](3)<br />
ans = 4<br />
octave:2> cos([0 pi pi/4 7])(3)<br />
ans = 0.70711<br />
<br />
In Matlab, it is for example necessary to assign the intermediate result {{Codeline|cos([0 pi pi/4 7])}} to a variable before it can be indexed again.<br />
<br />
===Exclamation mark as not operator===<br />
<br />
The exclamation mark {{Codeline|!}} (aka “Bang!”) is a negation operator, just like the tilde {{Codeline|~}}:<br />
<br />
octave:1> if ! strcmp (program_name, "octave"),<br />
> "It's an error"<br />
> else<br />
> "It works!"<br />
> end<br />
ans = It works!<br />
Note however that Matlab uses the {{Codeline|!}} operator for shell escapes, for which Octave requires using the system command.<br />
<br />
===Increment and decrement operators===<br />
<br />
If you like the {{Codeline|++}}, {{Codeline|+&#61;}} etc operators, rejoice! Octave includes the C-like increment and decrement operators {{Codeline|++}} and {{Codeline|--}} in both their prefix and postfix forms, in addition to {{Codeline|+&#61;}}, {{Codeline|-&#61;}}, {{Codeline|*&#61;}}, {{Codeline|/&#61;}}, {{Codeline|^&#61;}},{{Codeline|.+&#61;}},{{Codeline|.-&#61;}},{{Codeline|.*&#61;}}, {{Codeline|./&#61;}} and {{Codeline|.^&#61;}}.<br />
<br />
For example, to pre-increment the variable x, you would write {{Codeline|++x}}. This would add one to x and then return the new value of x as the result of the expression. It is exactly the same as the expression {{Codeline|x &#61; x + 1}}.<br />
<br />
To post-increment a variable x, you would write {{Codeline|x++}}. This adds one to the variable x, but returns the value that x had prior to incrementing it. For example, if x is equal to 2, the result of the expression x++ is 2, and the new value of x is 3.<br />
<br />
For matrix and vector arguments, the increment and decrement operators work on each element of the operand.<br />
<br />
===Unwind-protect===<br />
<br />
In addition to try-catch blocks, Octave supports an alternative form of exception handling modeled after the unwind-protect form of Lisp. The general form of an unwind_protect block looks like this:<br />
<br />
unwind_protect<br />
body<br />
unwind_protect_cleanup<br />
cleanup<br />
end_unwind_protect<br />
<br />
Where body and cleanup are both optional and may contain any Octave expressions or commands. The statements in cleanup are guaranteed to be executed regardless of how control exits body.<br />
<br />
The unwind_protect statement is often used to reliably restore the values of global variables that need to be temporarily changed.<br />
<br />
Matlab can be made to do something similar with their {{Codeline|onCleanup}} function that was introduced in 2008a. Octave also has {{Codeline|onCleanup}} since version 3.4.0.<br />
<br />
===Built-in ODE and DAE solvers===<br />
<br />
Octave includes LSODE, DASSL and DASPK for solving systems of stiff ordinary differential and differential-algebraic equations. These functions are built in to the interpreter.<br />
<br />
===Do-Until loop structure===<br />
<br />
Similar to the do-while loop in C and C++, Octave allows a do-until loop which does not exist in Matlab<br />
<br />
x = 0<br />
do<br />
x += 1;<br />
until (x == 10)<br />
<br />
==How does Octave solve linear systems?==<br />
<br />
In addition to consulting Octave's source for the precise details, you can read the Octave manual for a complete high-level description of the algorithm that Octave uses to decide how to solve a particular linear system, e.g. how the backslash operator {{Codeline|A\x}} will be interpreted. Sections [http://www.gnu.org/software/octave/doc/interpreter/Techniques-Used-for-Linear-Algebra.html#Techniques-Used-for-Linear-Algebra Techniques Used for Linear Algebra] and [http://www.gnu.org/software/octave/doc/interpreter/Sparse-Linear-Algebra.html Linear Algebra on Sparse Matrices] from the manual describe this procedure.<br />
<br />
=How do I...?=<br />
<br />
==How do I execute an Octave script?==<br />
<br />
First of all, make sure you understand [http://www.gnu.org/software/octave/doc/interpreter/Script-Files.html the difference between script files and function files]. If you want to execute a function defined in a file, just call the function like any other Octave function: <code>foo(arg1, arg2);</code><br />
<br />
To execute a script from within Octave, just type its name without the .m extension. Thus, if you have a script called <code>foo.m</code>, just type <code>foo</code> from within Octave to execute it. You have to make sure that the script is in your current path. Type <code>path</code> in Octave to see what this path is, and type <code>pwd</code> to print the working directory (where you're currently standing). The current working directory is referred to as "." in the <code>path</code>.<br />
<br />
If the script name has characters that are not valid for an Octave identifier, or if you do not want to use addpath to add the script's location to the current path, you can use the <code>run</code> function instead:<br />
<br />
octave> run("Script Name With Spaces.m")<br />
octave> run("/opt/local/foo.m")<br />
<br />
An alternative is to run the script from outside Octave by calling Octave from your operating system shell. Unlike calling the script from inside Octave, this also allows you to pass arguments from the shell into the script, which the script can access using the <code>argv</code> command:<br />
<br />
$ octave the-script.m arg1 arg2<br />
<br />
In a Unix environment, if the script has a [http://en.wikipedia.org/wiki/Shebang_%28Unix%29 shebang] (e.g. <code>#!/usr/bin/octave</code>) and executable permissions, you can call it like any other Unix program with arguments:<br />
<br />
$ ./the-script arg1 arg2<br />
<br />
If you call the script from the shell and it's plotting, please note [[#When I try plotting from a script, why am I not seeing anything?|how to plot when running a script from the shell]].<br />
<br />
==do xxxx?==<br />
<br />
You are probably looking for the function ''lookfor''. This function searches the help text of all functions for a specific string and returns a list of functions. Note that by default it will only search the first line of the help text (check ''help lookfor'' at the octave prompt for more). The following example helps to find the function to calculate correlation coefficient in a matrix:<br />
<br />
octave> lookfor correlation<br />
corr2 Returns the correlation coefficient between I and J.<br />
cor Compute correlation.<br />
corrcoef Compute correlation.<br />
spearman Compute Spearman's rank correlation coefficient RHO for each of the variables sp<br />
autocor Return the autocorrelations from lag 0 to H of vector X.<br />
<br />
Also, there's a high chance that the function name has a suggestive name, and so you can try auto-completion to get some hints. For the previous example, typing ''corr'' at the octave promp followed by pressing [Tab] twice would suggest the following:<br />
<br />
octave> corr<br />
corr2 corrcoef<br />
<br />
==How do I erase a figure?== <br />
<br />
closeplot(); <br />
closefig(number)<br />
<br />
==How do I set the number of displayed decimals?==<br />
<br />
octave:1> format long<br />
octave:2> pi<br />
pi = 3.14159265358979<br />
octave:3> format short<br />
octave:4> pi<br />
pi = 3.1416<br />
<br />
==How do I call an octave function from C++?==<br />
<br />
*Here is an untested code snippet for calling rand([9000,1]), modified from a post by HerberFarnsworth? to help-octave on 2003-05-01:<br />
<br />
#include <octave/oct.h><br />
...<br />
ColumnVector NumRands(2);<br />
NumRands(0) = 9000;<br />
NumRands(1) = 1;<br />
octave_value_list f_arg, f_ret;<br />
f_arg(0) = octave_value(NumRands);<br />
f_ret = feval("rand",f_arg,1);<br />
Matrix unis(f_ret(0).matrix_value());<br />
<br />
==How do I change colour/line definition in gnuplot postscript?==<br />
Here is a awk script to get a rainbow colour map<br />
<br />
#!/bin/awk -f<br />
<br />
BEGIN {<br />
split("0 4 6 7 5 3 1 2 8", rainbow, " ");<br />
split("7 3 1 0 2 4 6 5 8", invraim, " ");<br />
}<br />
<br />
$1 ~ /\/LT[0-8]/ {<br />
n = substr($1, 4, 1);<br />
if (n == 0)<br />
lt = "{ PL [] 0.9 0.1 0.1 DL } def";<br />
else if (n == 1)<br />
lt = "{ PL [4 dl 2 dl] 0.1 .75 0.1 DL } def";<br />
else if (n == 2)<br />
lt = "{ PL [2 dl 3 dl] 0.1 0.1 0.9 DL } def";<br />
else if (n == 3)<br />
lt = "{ PL [1 dl 1.5 dl] 0.9 0 0.8 DL } def";<br />
else if (n == 4)<br />
lt = "{ PL [5 dl 2 dl 1 dl 2 dl] 0.1 0.8 0.8 DL } def";<br />
else if (n == 5)<br />
lt = "{ PL [4 dl 3 dl 1 dl 3 dl] 0.9 0.8 0.2 DL } def";<br />
else if (n == 6)<br />
lt = "{ PL [2 dl 2 dl 2 dl 4 dl] 0.5 0.3 0.1 DL } def";<br />
else if (n == 7)<br />
lt = "{ PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.4 0 DL } def";<br />
else if (n == 8)<br />
lt = "{ PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def";<br />
$0 = sprintf("/LT%d %s", rainbow[n+1], lt);<br />
##$0 = sprintf("/LT%x %s", invraim[n+1], lt);<br />
##$0 = sprintf("/LT%x %s", n, lt);<br />
}<br />
<br />
{ print; }<br />
<br />
==How do I tell if a file exists?==<br />
<br />
Look at functions like exist, file_in_path.. and the other functions that their descriptions point to.<br />
<br />
<br />
==How do I create a plot without a window popping up (ie, a plot to a file)?==<br />
<br />
'''This only works with gnuplot as graphics_toolkit, NOT with fltk. See [https://savannah.gnu.org/bugs/?33180 Bug#33180]'''<br />
<br />
figure(1, "visible", "off");<br />
plot(sin(1:100));<br />
print -deps "/tmp/sin.eps"<br />
<br />
One can set that behaviour as default:<br />
<br />
set(0, 'defaultfigurevisible', 'off');<br />
<br />
== How do I make Octave use more precision? ==<br />
<br />
Octave's default numerical type is IEEE 754 doubles, a.k.a. hardware floats. This type has 52 bits of precision or about 16 decimal digits. It's implemented in your computer's hardware, in your CPU, so it's '''fast'''. This type is assumed throughout for Octave's calculations.<br />
<br />
You can use a few other built-in types. The int64 type will have 63 bits of precision. One bit is used for the sign, but if you don't want to lose that bit, uint64 can be used instead. These types, however, cannot represent numbers as large as the default double type, and can only represent integers. Furthermore, there is no way to represent integer literals, so if you do <br />
<br />
<syntaxhighlight lang="Octave">uint64(18446744073709551610);</syntaxhighlight><br />
<br />
the literal "18446744073709551610" first gets converted to a double precision type, so <code>uint64</code>'s additional precision is lost. Instead, initialise the <code>uint64</code> with smaller numbers and perform a computation to get the larger number you want. E.g., <br />
<br />
<syntaxhighlight lang="Octave">uint64(999999999999999) * 10000</syntaxhighlight><br />
<br />
would produce value 9999999999999990000, which is close to the maximum possible value for the uint64 type, but can't be at the moment input directly, doing uint64(9999999999999990000), due to the mentioned error of rounding.<br />
<br />
Alternatively, one may use arbitrary precision arithmetic, which has as much precision as is practical to hold in your computer's memory. The ''symbolic'' package, when it works, has a vpa() function for arbitrary precision arithmetic. Note that arbitrary precision arithmetic must be implemented '''in software''' which makes it much slower than hardware floats.<br />
<br />
At present, however, the symbolic package is almost useless, since even when you get it to compile and not crash, it cannot handle any array type, which hardly helps for an array-oriented language like Octave. If this limitation is not important to you, attempt to use the symbolic package. If you would like to get this fixed, [http://octave.1599824.n4.nabble.com/Internal-Precision-Symbolic-tp4645257p4645594.html Jordi Gutiérrez Hermoso has volunteered] to fix the package for 5000 USD, which can be obtained from a kickstarter campaign.<br />
<br />
Consider carefully if your problem really needs more precision. Often if you're running out of precision the problem lies fundamentally in your methods being [http://en.wikipedia.org/wiki/Numerical_stability numerically unstable], so more precision will not help you here. If you absolutely must use arbitrary-precision arithmetic, you're at present better off using a CAS instead of Octave. An example of such a CAS is [http://sagemath.org Sage].<br />
<br />
=Common problems=<br />
<br />
==I am running a script that should produce output during execution but I don't see anything until it has finished==<br />
<br />
By default Octave is set to pass its screen output through a pager (usually the default pager is "less") which allows<br />
things such as navigating through the output with arrow keys or searching for text or regular expressions within the output.<br />
The pager only displays the output after it's finished receiving it, so when it is active you'll not be able to see anything until your script has terminated. To change this behavior temporarily or permanently you may want to use one of the options described [http://www.gnu.org/software/octave/doc/interpreter/Paging-Screen-Output.html here].<br />
<br />
==When I try plotting from a script, why am I not seeing anything?==<br />
<br />
If you are running an Octave script that includes a plotting command, the script and Octave may terminate immediately. So the plot window does show up, but immediately closes when Octave finishes execution. Alternatively, if using fltk, the plot window needs a readline loop to show up (the time when Octave is sitting around doing nothing waiting for interactive input).<br />
<br />
A common solution is to put a {{Codeline|pause}} command at the end of your script.<br />
<br />
==How do I get sound input or output in Windows?== <br />
Sound I/O is badly broken on anything that isn't using Linux's Open Sound System. Nowadays, this usually doesn't even include Linux, since OSS is frequently considered "legacy". All of the audio functions in Octave are badly in need of a rewrite so that they actually work.<br />
<br />
==I cannot install a package. Octave complains about a missing mkoctfile.==<br />
<br />
You should normally use your distribution's packages. For Debian and Fedora, Octave package '''foo''' will be a deb or rpm called '''octave-foo''', and you should install that instead using apt or yum.<br />
<br />
If you really need to build Octave packages from source to install them, you'll need mkoctfile. Most distributions split Octave into several packages. The script mkoctfile is then part of a separate package:<br />
<br />
* Debian/Ubuntu: {{Codeline|octave-headers}} or {{Codeline|liboctave-dev}}<br />
<br />
* Fedora: {{Codeline|octave-devel}}<br />
<br />
== I'm having problem XXX using the latest Octave version ==<br />
<br />
Please be more specific. What is the latest version, according to you? If you mean the latest released version, be aware that you may still have an older version due to whatever distribution method you're using. There may be a newer version available that you're not aware of due to the distribution method you're using to get Octave, and in most cases, there is a way to get a newer version via your distribution method (see other wiki pages for [[Octave_for_GNU/Linux|GNU/Linux]], [[Octave_for_MacOS_X|Mac OSX]], and [[Octave_for_Windows|Windows]]).<br />
<br />
If you mean the latest Mercurial revision, please specify which one that is. "Latest tip" is not informative, because from the time you wrote "latest tip" to the time someone reads that message, "latest tip" might have changed meaning. Also, you might be standing on a different commit than what "hg tip" says. The tip may be on a different branch, or you might have updated to a different revision different from what "hg tip" says.<br />
<br />
Instead, report the output of "hg summary" or "hg id". Also please use hashes instead or in addition to revision numbers. Revision numbers are just a convenience and only make sense in your local repo, and might not coincide with what someone sees on their own repo. Hashes are globally unique across all repos.<br />
<br />
If your problem truly persists with the latest version, as indicated [http://www.gnu.org/software/octave/download.html here], then by all means report a bug or ask for help, but don't be surprised if volunteers are less inclined to help you with a problem that only exists in an older version of Octave.<br />
<br />
== Why is this floating point computation wrong? ==<br />
<br />
Floating point arithmetic is an approximation '''in binary''' to arithmetic on real or complex numbers. Just like you cannot represent 1/3 exactly in decimal arithmetic (0.333333 is only a rough approximation to 1/3), you cannot represent some fractions like <math>1/10</math> exactly in base 2. In binary, the representation to one tenth is <math>0.0\overline{0011}_b</math> where the bar indicates that it repeats infinitely (like how <math>1/6 = 0.1\overline{6}_d</math> in decimal). Because this infinite repetition cannot be represented exactly with a finite number of digits, rounding errors occur for values that appear to be exact in decimal but are in fact approximations in binary, such as for example how 0.3 - 0.2 - 0.1 is not equal to zero.<br />
<br />
This isn't an Octave bug. It happens with any program that uses [http://en.wikipedia.org/wiki/IEEE_754 IEEE 754 floating point arithmetic]. The reason why Octave and other programs use IEEE 754 floats is that they are ''fast'', because they are implemented in hardware. Unless you are using very exotic hardware, Octave will use your computer's processor for floating point arithmetic.<br />
<br />
Like death and taxes, rounding errors are a fact of life. You cannot avoid them. You can only move a rounding error from one part of a computation to another, or you can use more precision and delay the rounding error. One way to delay the rounding error is to use arbitrary precision arithmetic, which is inevitably slower as it has to be implemented in software instead of hardware. You may use the vpa function from the symbolic package for this purpose.<br />
<br />
Another approach to the problem is interval arithmetic with the [[Interval package]]. Then, the exact result would always be enclosed by two binary floats. Again, this is slower since only the most basic interval arithmetic operations can be performed in hardware.<br />
<br />
To learn more about floating point arithmetic, consult [http://en.wikipedia.org/wiki/Floating_point_arithmetic its Wikipedia article] or the classical reference [http://floating-point-gui.de/ What Every Computer Scientist Should Know About Floating Point Arithmetic].<br />
<br />
== I have installed a package but still get a "foo undefined" error ==<br />
<br />
You have probably forgotten to load the package. Use {{Codeline|pkg load package-name}} to load it. Most packages are no longer loaded automatically to avoid surprises. See reasoning on related FAQ [[FAQ#How_do_I_install_all_Octave_packages.3F|how do I install all Octave packages]]. If you want a specific package to be loaded by default at startup, consider adding the {{Codeline|pkg load}} command on your {{path|.octaverc}} file.<br />
<br />
== Missing lines when printing under Windows with OpenGL toolkit and Intel integrated GPU ==<br />
<br />
Some windows users with integrated Intel GPUs have reported missing lines when printing with an OpenGL toolkit like FLTK or Qt. {{bug|42534}}<br />
<br />
Users with this kind of problem should try to install/update their Intel OpenGL drivers for Windows or consider installing Mesa drivers from http://qt-project.org/wiki/Cross-compiling-Mesa-for-Windows<br />
<br />
See also https://www.opengl.org/wiki/FAQ#Why_is_my_GL_version_only_1.4_or_lower.3F<br />
<br />
=Porting programs from Matlab to Octave=<br />
<br />
People often ask<br />
<br />
<blockquote><br />
I wrote some code for Matlab, and I want to get it running under Octave. Is there anything I should watch out for?<br />
</blockquote><br />
<br />
or alternatively<br />
<br />
<blockquote><br />
I wrote some code in Octave, and want to share it with Matlab users. Is there anything I should watch out for?<br />
</blockquote><br />
<br />
which is not quite the same thing. There are still a number of differences between Octave and Matlab, however in general differences between the two are considered as bugs. Octave might consider that the bug is in Matlab and do nothing about it, but generally functionality is almost identical. If you find an important functional difference between Octave behavior and Matlab, then you should send a description of this difference (with code illustrating the difference, if possible) to http://bugs.octave.org.<br />
<br />
Furthermore, Octave adds a few syntactical extensions to Matlab that might cause some issues when exchanging files between Matlab and Octave users.<br />
<br />
As both Octave and Matlab are under constant development, the information in this section is subject to change.<br />
<br />
You should also look at the pages http://octave.sourceforge.net/packages.php and http://octave.sourceforge.net/docs.html that have a function reference that is up to date. You can use this function reference to see the number of octave functions that are available and their Matlab compatibility.<br />
<br />
==How is Octave different from Matlab?==<br />
<br />
The major differences between Octave 3.4.N and Matlab R2010b are:<br />
<br />
===Nested Functions===<br />
Octave has limited support for nested functions. That is<br />
<br />
function y = foo (x)<br />
y = bar(x)<br />
function y = bar (x)<br />
y = ...;<br />
end<br />
end<br />
<br />
is equivalent to<br />
<br />
function y = foo (x)<br />
y = bar(x)<br />
end<br />
function y = bar (x)<br />
y = ...;<br />
end<br />
<br />
The main difference with Matlab is a matter of scope. While nested functions have access to the parent function's scope in Matlab, no such thing is available in Octave, due to how Octave essentially “un-nests” nested functions.<br />
<br />
The authors of Octave consider the nested function scoping rules of Matlab to be more problems than they are worth as they introduce difficult to find bugs as inadvertently modifying a variable in a nested function that is also used in the parent is particularly easy for those not attentive to detail.<br />
<br />
===Differences in core syntax===<br />
<br />
There are a few core Matlab syntaxes that are not accepted by Octave, these being<br />
<br />
* Some limitations on the use of function handles. The major difference is related to nested function scoping rules (as above) and their use with function handles.<br />
<br />
* Some limitations of variable argument lists on the LHS of an expression, though the most common types are accepted.<br />
<br />
* Matlab classdef object oriented programming is not yet supported, though work is underway in a branch of the development tree.<br />
<br />
===Differences in core functions===<br />
<br />
A large number of the Matlab core functions (ie those that are in the core and not a toolbox) are implemented, and certainly all of the commonly used ones. There are a few functions that aren't implemented, usually to do with specific missing Octave functionality (GUI, DLL, Java, ActiveX, DDE, web, and serial functions). Some of the core functions have limitations that aren't in the Matlab version. For example the sprandn function can not force a particular condition number for the matrix like Matlab can.<br />
<br />
===Just-In-Time compiler===<br />
<br />
Matlab includes a "Just-In-Time" compiler. This compiler allows the acceleration of for-loops in Matlab to almost native performance with certain restrictions. The JIT must know the return type of all functions called in the loops and so you can't include user functions in the loop of JIT optimized loops. Octave doesn't have a JIT and so to some might seem slower than Matlab. For this reason you must vectorize your code as much as possible. The MathWorks themselves have a good document discussing vectorization at http://www.mathworks.com/support/tech-notes/1100/1109.html.<br />
<br />
===Compiler===<br />
<br />
On a related point, there is no Octave compiler, and so you can't convert your Octave code into a binary for additional speed or distribution. There have been several aborted attempts at creating an Octave compiler. Should the JIT compiler above ever be implemented, an Octave compiler should be more feasible.<br />
<br />
===Graphic handles===<br />
<br />
Up to Octave 2.9.9 there was no support for graphic handles in Octave itself. In the 3.2.N versions of Octave and beyond the support for graphics handles is converging towards full compatibility. The patch function is currently limited to 2-D patches, due to an underlying limitation in gnuplot, but the experimental OpenGL backend is starting to see an implementation of 3-D patches.<br />
<br />
===GUI functions ===<br />
<br />
There are no Matlab compatible GUI functions yet. This might be an issue if you intend to exchange Octave code with Matlab users. There are a number of bindings from Octave to {{Forge|tcl-octave|Tcl/Tk}}, [http://octaviz.sourceforge.net/index.php? VTK] and {{Forge|zenity}} for example, that can be used for a GUI, but these are not Matlab compatible. Work on a Matlab compatible GUI is in an alpha stage in the QtHandles project, which may form part of a future release of Octave.<br />
<br />
===Simulink===<br />
<br />
Octave itself includes no Simulink support. Typically the simulink models lag research and are less flexible, so shouldn't really be used in a research environment. However, some Matlab users that try to use Octave complain about this lack.<br />
<br />
===MEX-Files===<br />
<br />
Octave includes an API to the Matlab MEX interface. However, as MEX is an API to the internals of Matlab and the internals of Octave differ from Matlab, there is necessarily a manipulation of the data to convert from a MEX interface to the Octave equivalent. This is notable for all complex matrices, where Matlab stores complex arrays as real and imaginary parts, whereas Octave respects the C99/C++ standards of co-locating the real/imag parts in memory. Also due to the way Matlab allows access to the arrays passed through a pointer, the MEX interface might require copies of arrays (even non complex ones).<br />
<br />
===Block comments===<br />
<br />
Block comments denoted by {{Codeline|#{}} and {{Codeline|#&#125;}} markers (or {{Codeline|%{}} and {{Codeline|%&#125;}}) are supported by Octave with some limitations. The major limitation is that block comments are not supported within [] or {}.<br />
<br />
===Mat-File format===<br />
<br />
There are some differences in the mat v5 file format accepted by Octave. Matlab recently introduced the "-V7.3" save option which is an HDF5 format which is particularly useful for 64-bit platforms where the standard Matlab format can not correctly save variables. Octave accepts HDF5 files, but is not yet compatible with the "-v7.3" versions produced by Matlab.<br />
<br />
Although Octave can load inline function handles saved by Matlab, it can not yet save them.<br />
<br />
Finally, some multi-byte Unicode characters aren't yet treated in mat-files.<br />
<br />
===Profiler===<br />
<br />
Thanks to Daniel Kraft's 2011 Google Summer of Code project, Octave has a profiler since version 3.6.0. However, at the moment it only produces text output and has its own makeshift interface for hierarchical profiling.<br />
<br />
===Toolboxes===<br />
<br />
Octave is a community project and so the toolboxes that exist are donated by those interested in them through [[Octave Forge]]. These might be lacking in certain functionality relative to the Matlab toolboxes, and might not exactly duplicate the Matlab functionality or interface.<br />
<br />
===Short-circuit {{Codeline|&}} and {{Codeline|&#124;}} operators===<br />
<br />
The {{Codeline|&}} and {{Codeline|&#124;}} operators in Matlab short-circuit when included in a condition (e.g. an {{Codeline|if}} or {{Codeline|while}} statement) and not otherwise. In Octave only the {{Codeline|&&}} and {{Codeline|&#124;&#124;}} short circuit. Note that this means that<br />
<br />
if (a | b)<br />
...<br />
end<br />
<br />
and<br />
<br />
t = a | b;<br />
if t<br />
...<br />
end<br />
<br />
have different semantics in Matlab. This is really a Matlab bug, but there is too much code out there that relies on this behaviour to change it. Prefer the {{Codeline|&#124;&#124;}} and {{Codeline|&&}} operators in {{Codeline|if}} statements if possible. If you need to use code written for Matlab that depends on this buggy behaviour, you can enable it since Octave 3.4.0 with the following command:<br />
<br />
do_braindead_shortcircuit_evaluation(1)<br />
<br />
Note that the difference with Matlab is also significant when either argument is a function with side effects or if the first argument is a scalar and the second argument is an empty matrix. For example, note the difference between<br />
<br />
t = 1 | []; ## results in [], so...<br />
if (t) 1, end ## in if ([]), this is false.<br />
<br />
and<br />
<br />
if (1 | []) 1, end ## short circuits so condition is true.<br />
<br />
Another case that is documented in the Matlab manuals is that<br />
<br />
t = [1, 1] | [1, 2, 3]; ## error<br />
if ([1, 1] | [1, 2, 3]) 1, end ## OK<br />
<br />
Also Matlab requires the operands of {{Codeline|&&}} and {{Codeline|&#124;&#124;}} to be scalar values but Octave does not (it just applies the rule that for an operand to be considered true, every element of the object must be nonzero or logically true).<br />
<br />
Finally, note the inconsistence of thinking of the condition of an {{Codeline|if}} statement as being equivalent to {{Codeline|all(X(:))}} when {{Codeline|X}} is a matrix. This is true for all cases EXCEPT empty matrices:<br />
<br />
if ([0, 1]) == if (all ([0, 1])) ==> i.e., condition is false.<br />
if ([1, 1]) == if (all ([1, 1])) ==> i.e., condition is true.<br />
<br />
However,<br />
<br />
if ([])<br />
<br />
is not the same as<br />
<br />
if (all ([]))<br />
<br />
because, despite the name, the {{Codeline|all}} is really returning true if none of the elements of the matrix are zero, and since there are no elements, well, none of them are zero. This is an example of [http://en.wikipedia.org/wiki/Vacuous_truth vacuous truth]. But, somewhere along the line, someone decided that {{Codeline|if ([])}} should be false. Mathworks probably thought it just looks wrong to have {{Codeline|[]}} be true in this context even if you can use logical gymnastics to convince yourself that "all" the elements of an empty matrix are nonzero. Octave however duplicates this behavior for {{Codeline|if}} statements containing empty matrices.<br />
<br />
===Solvers for singular, under- and over-determined matrices===<br />
<br />
Matlab's solvers as used by the operators mldivide (\) and mrdivide (/), use a different approach than Octave's in the case of singular, under-, or over-determined matrices. In the case of a singular matrix, Matlab returns the result given by the LU decomposition, even though the underlying solver has flagged the result as erroneous. Octave has made the choice of falling back to a minimum norm solution of matrices that have been flagged as singular which arguably is a better result for these cases.<br />
<br />
In the case of under- or over-determined matrices, Octave continues to use a minimum norm solution, whereas Matlab uses an approach that is equivalent to<br />
<br />
function x = mldivide (A, b)<br />
m = rows(A);<br />
[Q, R, E] = qr(A);<br />
x = [A \ b, E(:, 1:m) * (R(:, 1:m) \ (Q' * b))]<br />
end<br />
<br />
While this approach is certainly faster and uses less memory than Octave's minimum norm approach, this approach seems to be inferior in other ways.<br />
<br />
A numerical question arises: how big can the null space component become, relative to the minimum-norm solution? Can it be nicely bounded, or can it be arbitrarily big? Consider this example:<br />
<br />
m = 10;<br />
n = 10000;<br />
A = ones(m, n) + 1e-6 * randn(m,n);<br />
b = ones(m, 1) + 1e-6 * randn(m,1);<br />
norm(A \ b)<br />
<br />
while Octave's minimum-norm values are around 3e-2, Matlab's results are 50-times larger. For another issue, try this code:<br />
<br />
m = 5;<br />
n = 100;<br />
j = floor(m * rand(1, n)) + 1;<br />
b = ones(m, 1);<br />
A = zeros(m, n);<br />
A(sub2ind(size(A),j,1:n)) = 1;<br />
x = A \ b;<br />
[dummy,p] = sort(rand(1,n));<br />
y = A(:,p)\b;<br />
norm(x(p)-y)<br />
<br />
It shows that unlike in Octave, mldivide in Matlab is not invariant with respect to column permutations. If there are multiple columns of the same norm, permuting columns of the matrix gets you different result than permuting the solution vector. This will surprise many users.<br />
<br />
Since the mldivide (\) and mrdivide (/) operators are often part of a more complex expression, where there is no room to react to warnings or flags, it should prefer intelligence (robustness) to speed, and so the Octave developers are firmly of the opinion that Octave's approach for singular, under- and over-determined matrices is a better choice than Matlab's.<br />
<br />
===Octave extensions===<br />
<br />
The extensions in Octave over MATLAB syntax are very useful, but might cause issues when sharing with Matlab users. A list of the major extensions that should be avoided to be compatible with Matlab are:<br />
<br />
Comments in Octave can be marked with {{Codeline|#}}. This allows POSIX systems to have the first line as {{Codeline|#! octave -q}} and mark the script itself executable. MATLAB doesn't have this feature due to the absence of comments starting with {{Codeline|#}}".<br />
<br />
Code blocks like if, for, while, etc can be terminated with block specific terminations like endif. MATLAB doesn't have this and all blocks must be terminated with end.<br />
<br />
Octave has a lisp-like {{Codeline|unwind_protect}} block that allows blocks of code that terminate in an error to ensure that the variables that are touched are restored. You can do something similar with try/catch combined with {{Codeline|rethrow (lasterror ())}} in Matlab, however rethrow and lasterror are only available in Octave 2.9.10 and later. MATLAB 2008a also introduced {{Codeline|OnCleanUp}} that is similar to {{Codeline|unwind_protect}}, except that the object created by this function has to be explicitly cleared in order for the cleanup code to run.<br />
<br />
Note that using try/catch combined with {{Codeline|rethrow (lasterror ())}} can not guarantee that global variables will be correctly reset, as it won't catch user interrupts with Ctrl-C. For example<br />
<br />
global a<br />
a = 1;<br />
try<br />
_a = a;<br />
a = 2<br />
while true<br />
end<br />
catch<br />
fprintf ('caught interrupt\n');<br />
a = _a;<br />
rethrow (lasterror());<br />
end<br />
<br />
compared to<br />
<br />
global a<br />
a = 1;<br />
unwind_protect<br />
_a = a;<br />
a = 2<br />
while true<br />
end<br />
unwind_protect_cleanup<br />
fprintf ('caught interrupt\n');<br />
a = _a;<br />
end<br />
<br />
Typing Ctrl-C in the first case returns the user directly to the prompt, and the variable ''a'' is not reset to the saved value. In the second case the variable ''a'' is reset correctly. Therefore Matlab gives no safe way of temporarily changing global variables.<br />
<br />
Indexing can be applied to all objects in Octave and not just variables. Therefore {{Codeline|sin(x)(1:10)}} for example is perfectly valid in Octave but not Matlab. To do the same in Matlab you must do {{Codeline|y &#61; sin(x); y &#61; y([1:10]);}}<br />
<br />
Octave has the operators {{Codeline|++}}, {{Codeline|–-}}, {{Codeline|-&#61;}}, {{Codeline|+&#61;}}, {{Codeline|*&#61;}}, etc. As MATLAB doesn't, if you are sharing code these should be avoided.<br />
<br />
Character strings in Octave can be denoted with double or single quotes. There is a subtle difference between the two in that escaped characters like {{Codeline|\n}} (newline), {{Codeline|\t}} (tab), etc are interpreted in double quoted strings but not single quoted strings. This difference is important on Windows platforms where the {{Codeline|\}} character is used in path names, and so single quoted strings should be used in paths. MATLAB doesn't have double quoted strings and so they should be avoided if the code will be transferred to a MATLAB user.<br />
<br />
=GUI=<br />
This is a small section but it's probably one of the most frequent questions.<br />
<br />
==Does Octave have a GUI?==<br />
Yes! It was released with Octave 3.8.0 (Jan 1st, 2014) but is considered experimental. To start Octave with the GUI, use the {{Codeline|--force-gui}} option.<br />
<br />
==When will the GUI stop being experimental?==<br />
The plan is for the GUI to be considered stable with version 4.0.<br />
<br />
==Why are you working on yet another GUI instead of making one that already exists better?==<br />
None of the GUIs for Octave that have been developed thus far are part of Octave and there is a reason for it. All of them fail at a very important point, integration with Octave. They treat Octave as a foreign black box using pipes for communication, an approach that is bound to fail with each new version. Any fix made to make them work with new Octave versions would only be temporary. This included QtOctave (now abandoned and incompatible with newer versions of Octave), Xoctave (which is proprietary and commercial) and GUI Octave (which is proprietary).<br />
<br />
QtOctave was great and very useful tool. It looked beautiful and we are thankful to its developers for working on such a nice tool plus making it libre. However, it would ''never'' be stable.<br />
<br />
Quint was a project for an Octave GUI that actually tried to do it right. Eventually it was merged into the Octave repository and is no longer a separate project. Also, many bits from QtOctave were reused in the GUI.</div>109.205.67.254https://wiki.octave.org/wiki/index.php?title=Octave_for_Microsoft_Windows&diff=5254Octave for Microsoft Windows2015-01-06T22:12:02Z<p>109.205.67.254: /* Octave 3.8 MXE Builds */</p>
<hr />
<div>:''For unofficial builds of the current 3.8.x release, see [http://mxeoctave.osuv.de here]''.<br />
<br />
GNU Octave is primarily developed on GNU/Linux and other POSIX conformal systems. The ports of GNU Octave to Windows use different approaches to get most of the original Octave and adapt it to Microsoft Windows idiosyncrasies (eg: dynamic libraries, file paths, permissions, environment variables, GUI system, etc). Bear this in mind and don't panic if you get unexpected results. There are a lot of suggestions on the mailing lists for tuning your Octave installation.<br />
<br />
About version numbers:<br />
*The 3.8.x are current releases.<br />
*The 3.6.x are previous releases.<br />
*The 3.4.x are very old releases.<br />
*The 3.2.x are very, very old releases.<br />
<br />
GNU Octave standalone ports for Windows are independently compiled using either the MinGW or Microsoft Visual Studio development environments. The latest versions can be downloaded from the Octave Forge Project at SourceForge.net and are often, but not always, up to date with the latest version of the GNU Octave source code. <br />
<br />
[http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/ Octave Forge - GNU Octave Program and Packages Download page]<br />
<br />
Detailed instructions for individual releases can be found below.<br />
<br />
=Octave 3.8 MXE Builds=<br />
<br />
Untouched [http://hg.octave.org/mxe-octave/ MXE] builds for the current 3.8.x release can be found <br />
[http://mxeoctave.osuv.de here].<br />
<br />
However, these are '''unofficial''' builds! Remember to keep this in mind if you refer to it on bug reports.<br />
<br />
If you got any problems while running Windows 8 or libstdc++-6.dll errors, try this [http://mxeoctave.osuv.de/octave-gui.bat octave-gui.bat] file and place it into your octave-3.8.0 folder (e.g. `C:/octave-3.8.0/`).<br />
<br />
@echo off<br />
set PATH=%CD%\bin\<br />
start octave --force-gui -i --line-editing<br />
exit<br />
<br />
The plot command also doesn't work well in case of Windows 8 system.<br />
<br />
=Building from source=<br />
Instructions are available from the Octave-Forge repository, see [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/]<br />
<br />
=MinGW ports=<br />
<br />
==Octave-3.6.4-mingw + octaveforge pkgs==<br />
<br />
===Files for manual installation===<br />
<br />
#Octave-3.6.4-mingw binaries tree<br />
#* Octave3.6.4_gcc4.6.2_20130329.7z - MD5:46BD238C664E17B4B25E72A11C38163F<br />
#: This is a 7z archive which includes a directory tree of all the binaries and libraries required for a complete octave installation (excluding octaveforge packages)<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/ Octave Forge]<br />
#:<br />
#* The archive include:<br />
#:* octave-3.6.4 including PDF documentation (built using Tatsuro Matsuka OctaveLibs and gplibs http://www.tatsuromatsuoka.com/octave/Eng/Win/)<br />
#:* mingw32 + msys tool chain<br />
#:* gnuplot-4.6.0<br />
#:* fig2dev-3.2.5c<br />
#:* ghostscript-9.0.7<br />
#:* pstoedit-3.61<br />
#:* OpenBLAS-v2.6.0 and ATLAS-3.8.4 based libblas alternatives<br />
#:<br />
#*'''Maintainer:''' Nitzan Arazi<br />
#*'''Latest update:''' 2013-03-29<br />
#Octaveforge pkgs, built for Octave-3.6.4-mingw<br />
#* Octave3.6.4_gcc4.6.2_pkgs_20130331.7z - MD5:8AB5F5F88E7267FB1E47BABC29FD7FE0<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20MinGW%20installer/ Octave Forge]<br />
#:<br />
#: This is a 7z archive which includes additional binaries and libraries for a set of octaveforge packages.<br />
#:<br />
#* The included packages are:<br />
#:* actuarial-1.1.0<br />
#:* ad-1.0.6_patched<br />
#:* audio-1.1.4<br />
#:* benchmark-1.1.1<br />
#:* bim-1.1.1<br />
#:* bioinfo-0.1.2<br />
#:* cgi-0.1.0<br />
#:* civil-engineering-1.0.7<br />
#:* combinatorics-2.0.0<br />
#:* communications-1.1.1_patched<br />
#:* control-2.4.2<br />
#:* data-smoothing-1.3.0<br />
#:* dataframe-0.9.1<br />
#:* econometrics-1.1.1<br />
#:* fenv-0.1.0<br />
#:* financial-0.4.0<br />
#:* fits-1.0.2<br />
#:* fpl-1.3.3<br />
#:* fuzzy-logic-toolkit-0.4.2<br />
#:* ga-0.10.0<br />
#:* general-1.3.2<br />
#:* generate_html-0.1.5<br />
#:* geometry-1.6.0<br />
#:* gnuplot-1.0.1<br />
#:* gsl-1.0.8<br />
#:* ident-1.0.7<br />
#:* image-2.0.0<br />
#:* informationtheory-0.1.8<br />
#:* integration-1.0.7_svn20120128<br />
#:* io-1.2.1<br />
#:* irsa-1.0.7<br />
#:* java-1.2.9_patched<br />
#:* linear-algebra-2.2.0<br />
#:* lssa-0.1.2<br />
#:* mapping-1.0.7<br />
#:* mechanics-1.3.1<br />
#:* miscellaneous-1.2.0<br />
#:* missing-functions-1.0.2<br />
#:* msh-1.0.6<br />
#:* multicore-0.2.15<br />
#:* nan-2.5.5<br />
#:* ncarray-1.0.0<br />
#:* nlwing2-1.2.0<br />
#:* nnet-0.1.13<br />
#:* nurbs-1.3.6<br />
#:* ocs-0.1.3_svn20120128_patched<br />
#:* octcdf-1.1.5<br />
#:* octclip-1.0.3<br />
#:* octgpr-1.2.0<br />
#:* octproj-1.1.2<br />
#:* odebvp-1.0.6<br />
#:* odepkg-0.8.4<br />
#:* optim-1.2.2<br />
#:* optiminterp-0.3.4<br />
#:* outliers-0.13.9<br />
#:* physicalconstants-1.0.0<br />
#:* plot-1.1.0<br />
#:* quaternion-2.0.2<br />
#:* queueing-1.2.1<br />
#:* secs1d-0.0.9<br />
#:* secs2d-0.0.8<br />
#:* secs3d-0.0.1<br />
#:* signal-1.2.1<br />
#:* simp-1.1.0<br />
#:* sockets-1.0.8_patched<br />
#:* specfun-1.1.0<br />
#:* special-matrix-1.0.7<br />
#:* splines-1.1.2<br />
#:* statistics-1.2.0<br />
#:* strings-1.1.0_patched<br />
#:* struct-1.0.10<br />
#:* symband-1.0.10<br />
#:* symbolic-1.1.0<br />
#:* tcl-octave-0.1.8<br />
#:* time-2.0.0<br />
#:* tsa-4.2.4<br />
#:* video-1.0.2_patched<br />
#:* vrml-1.0.13_patched<br />
#:* windows-1.2.1<br />
#:* xraylib-1.0.8<br />
#:* zenity-0.5.7<br />
#:<br />
#*'''Maintainer:''' Nitzan Arazi<br />
#*'''Latest update:''' 2013-03-31<br />
<br />
===Manual installation instructions===<br />
#Create an installation directory of which doesn't have space chars (i.e. C:\Octave\Octave3.6.4_gcc4.6.2\). This directory is referred hereafter as <your_install_dir>.<br />
#Extract the complete directories tree from Octave3.6.4_gcc4.6.2_20130329.7z to the installation directory keeping the original directory structure as in the archive (you can use 7-zip tool from http://www.7-zip.org/). Note that the archive contains Octave3.6.4_gcc4.6.2 folder, so you want to extract to the *parent* of <your_install_dir>.<br />
#Copy octave3.6.4_gcc4.6.2.lnk to any convenient location and edit its properties respectively to point to <your_install_dir>\bin\octave.exe and <your_install_dir>\doc\octave\icons\octave-logo.ico as an icon<br />
#:Note for windows 8 users: As a workaround for a gnulib windows 8 compatibility bug, add command line switches ' -i --line-editing' to the octave.exe shortcut (i.e. <octave-dir>\bin\octave.exe -i --line-editing)<br />
#Copy octave3.6.4_gcc4.6.2_docs.lnk to any convenient location and edit its properties respectively to point to <your_install_dir>\doc\octave and <your_install_dir>\doc\octave\icons\octave-logo.ico as an icon.<br />
#:At this point you can:<br />
#: a. Launch and use octave by double-clicking the copied octave3.6.4_gcc4.6.2.lnk<br />
#: b. Access and browse the documentation files by double-clicking the copied octave3.6.4_gcc4.6.2_docs.lnk<br />
#Optional libblas dll replacement for optimizing the linear algebra subroutines for your CPU:<br />
#:* The default configuration should automatically detect your cpu architecture and select an appropriately tuned library. <br />
#:* In case the default library is not properly functioning on the actual cpu, or you wish to explore the performance with another library, you can manually replace the default one by performing the following procedures (where libblas.dll.<libblas_source> should be replaced with the full name of the desired library from the list below these instructions):<br />
#:*# Exit octave<br />
#:*# Delete <your_install_dir>\bin\libblas.dll<br />
#:*# Make a copy of the desired <your_install_dir>\bin\libblas.dll.<libblas_source><br />
#:*# Rename the copy of the desired <your_install_dir>\bin\libblas.dll.<libblas_source> to libblas.dll<br />
#:* The following is a list of the available libblas.dll.<libblas_source> options:<br />
#:*# libblas.dll.ref - reference blas implementation, very slow but most stable<br />
#:*# libblas.dll.OpenBLAS-v2.6.0-0-54e7b37_dynamicarch_nt4 - Openblas based, up to 4 threads, detects cpu architecture and selects respective lib<br />
#:*# libblas.dll.OpenBLAS-v2.6.0-0-54e7b37_nehalem_nt4 - Openblas based, up to 4 threads, tuned for nehalem cpu architecture<br />
#:*# libblas.dll.OpenBLAS-v2.6.0-0-54e7b37_core2_nt4 - Openblas based, up to 4 threads, tuned for core2 cpu architecture<br />
#:*# libblas.dll.OpenBLAS-v2.6.0-0-54e7b37_sandybridge_nt4 - Openblas based, up to 4 threads, tuned for sandybridge cpu architecture<br />
#:*# libblas.dll.OpenBLAS-v2.6.0-0-54e7b37_atom_nt4 - Openblas based, up to 4 threads, tuned for atom cpu architecture<br />
#:*# libblas.dll.altas-3.8.4_ht-pentium - ATLAS based libblass, tuned for older ht-pentium (compiled by Tatsuro Matsuka)<br />
#:*# libblas.dll.altas-3.8.4_corei5 - ATLAS based libblass, tuned for older core i5 cpu (compiled by Tatsuro Matsuka)<br />
<br />
===Manual installation instructions for the Octave-forge packages===<br />
#Extract the complete directories tree from Octave3.6.4_gcc4.6.2_pkgs_20130331.7z to the installation directory (<your_install_dir>) keeping the original directory structure as in the archive (you can use 7zip tool from http://www.7-zip.org/).<br />
#In order to update octave_packages database with your installation tree and auto-load most packages (excluding 'ad' and 'windows' which may crash octave when loaded and 'clear all' is executed), launch Octave and execute the following five rebuild commands from the octave console:<br />
pkg rebuild -auto<br />
pkg rebuild -noauto ad % may crash octave when loaded and 'clear all' is executed<br />
pkg rebuild -noauto nan % shadows many statistics functions<br />
pkg rebuild -noauto gsl % shadows some core functions<br />
pkg rebuild -auto java<br />
#: Last pkg rebuild command is required in order for the java pkg entry to be moved to the top of <your_install_dir>\share\octave\octave_packages db file - thus java pkg is loaded before io pkg is loaded, and io pkg related jars are added to java class path.<br />
#You can optionally adjust your installed packages status per your specific needs and usage by executing the following commands:<br />
: a. To interactively load or unload a package<br />
pkg load <pkg_name><br />
: or<br />
pkg unload <pkg_name><br />
: b. To disable auto-load for specific pkg <pkg_name><br />
pkg rebuild -noauto <pkg_name><br />
: c. To enable auto-load for specific pkg <pkg_name><br />
pkg rebuild -auto <pkg_name><br />
: d. To completely uninstall a package<br />
pkg uninstall <pkg_name><br />
<br />
===Optional installation of Notepad++ as an editor (recommended)===<br />
#Download recent Notepad++ installation package from http://notepad-plus-plus.org/ and install it on your system.<br />
#Edit <your_install_dir>\share\octave\site\m\startup\octaverc and un-comment the line which sets octave default editor:<br />
EDITOR('C:\Program Files\Notepad++\notepad++.exe');<br />
edit ("editor", sprintf ("%s %%s", EDITOR ()))<br />
edit mode async<br />
: Note: win64 users may use the w32 programs directory:<br />
EDITOR('C:\Program Files (x86)\Notepad++\notepad++.exe');<br />
: Note: You may adjust the above line for the location of notepad++.exe as installed on your system.<br />
<br />
===Troubleshooting===<br />
Upon launching, some warnings may be displayed. These warnings can be ignored.<br />
*Following warnings are about missing external tools which may reduce some of the functions of some packages. These external tools are not provided by the 7z archives in sourceforge. <br />
warning: gmsh does not seem to be present some functionalities will be disabled <br />
warning: dx does not seem to be present some functionalities will be disabled <br />
*Following warning is about fstat function of the statistics package that overloads the old (to be deprecated) fstat function of octave-3.6.4 <br />
warning: function C:\Octave\3.6.4_gcc-4.6.2\share\octave\packages\statistics-1.2.0\fstat.m shadows a core library function<br />
<br />
==Octave-3.6.2-mingw + octaveforge pkgs==<br />
<br />
===Files for manual installation===<br />
<br />
#Octave-3.6.2-mingw binaries tree<br />
#* Octave362_gcc462_20120609.7z - MD5:1FA1F6191C151D527830722F71822312<br />
#: This is a 7z archive which includes a directory tree of all the binaries and libraries required for a complete octave installation (excluding octaveforge packages)<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.2%20for%20Windows%20MinGW%20installer/ Octave Forge]<br />
<br />
==Octave-3.6.1-mingw + octaveforge pkgs==<br />
<br />
===Files for manual installation===<br />
<br />
#Octave-3.6.1-mingw binaries tree<br />
#* Octave3.6.1_gcc4.6.2_20120303.7z - MD5:294B99B5E4D47CAA83E8940EB2918D10<br />
#: This is a 7z archive which includes a directory tree of all the binaries and libraries required for a complete octave installation (excluding octaveforge packages)<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.1%20for%20Windows%20MinGW%20installer/ Octave Forge]<br />
#:<br />
#* The archive include:<br />
#:* octave-3.6.1 including PDF documentation (built by Tatsuro Matsuka http://www.tatsuromatsuoka.com/octave/Eng/Win/)<br />
#:* OpenBLAS-r0.1alpha2.5 and ATLAS-3.8.4 based libblas altenatives<br />
#:* mingw32 + msys tool chain<br />
#:* gnuplot-4.4.4<br />
#:* fig2dev-3.2.5c<br />
#:* ghostscript-9.0.4<br />
#:* pstoedit-3.60<br />
#:<br />
#*'''Maintainer:''' Nitzan Arazi<br />
#*'''Latest update:''' 2012-03-03<br />
#Octaveforge pkgs, built for Octave-3.6.1-mingw<br />
#* Octave3.6.1_gcc4.6.2_pkgs_20120303.7z - MD5:44A85F26A8925FEC5E1F0856408C9DD5<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.1%20for%20Windows%20MinGW%20installer/ Octave Forge]<br />
#:<br />
#: This is a 7z archive which includes additional binaries and libraries for a set of octaveforge packages.<br />
#:<br />
#* The included packages are:<br />
#:* actuarial-1.1.0<br />
#:* ad-1.0.6_patched<br />
#:* audio-1.1.4<br />
#:* benchmark-1.1.1<br />
#:* bim-1.0.2<br />
#:* bioinfo-0.1.2<br />
#:* civil-engineering-1.0.7<br />
#:* combinatorics-1.0.9<br />
#:* communications-1.1.0_svn20120127_patched<br />
#:* control-2.2.5<br />
#:* data-smoothing-1.3.0<br />
#:* dataframe-0.9.1<br />
#:* econometrics-1.0.8<br />
#:* fenv-0.1.0<br />
#:* financial-0.3.2<br />
#:* fpl-1.2.0<br />
#:* fuzzy-logic-toolkit-0.3.0<br />
#:* ga-0.9.8<br />
#:* general-1.2.2<br />
#:* generate_html-0.1.3<br />
#:* geometry-1.4.0<br />
#:* gnuplot-1.0.1<br />
#:* gpc-0.1.7<br />
#:* gsl-1.0.8<br />
#:* ident-1.0.7<br />
#:* image-1.0.15<br />
#:* informationtheory-0.1.8<br />
#:* integration-1.0.7_svn20120128<br />
#:* io-1.0.17<br />
#:* irsa-1.0.7<br />
#:* java-1.2.8_patched<br />
#:* linear-algebra-2.1.0_svn20120225<br />
#:* mapping-1.0.7<br />
#:* mechanics-1.2.0<br />
#:* miscellaneous-1.0.11_svn20120127<br />
#:* missing-functions-1.0.2<br />
#:* msh-1.0.2<br />
#:* multicore-0.2.15<br />
#:* nan-2.5.2<br />
#:* nlwing2-1.2.0<br />
#:* nnet-0.1.13<br />
#:* nurbs-1.3.5<br />
#:* ocs-0.1.3_svn20120128_patched<br />
#:* octclip-1.0.0<br />
#:* octgpr-1.2.0<br />
#:* odebvp-1.0.6<br />
#:* odepkg-0.8.0_svn20120127<br />
#:* optim-1.0.17_patched<br />
#:* optiminterp-0.3.4_svn20120128_patched<br />
#:* outliers-0.13.9<br />
#:* physicalconstants-0.1.7<br />
#:* plot-1.1.0<br />
#:* quaternion-1.0.0<br />
#:* queueing-1.0.0<br />
#:* secs1d-0.0.8<br />
#:* secs2d-0.0.8<br />
#:* secs3d-0.0.1<br />
#:* signal-1.1.2<br />
#:* simp-1.1.0<br />
#:* sockets-1.0.7_svn20120128_patched<br />
#:* specfun-1.1.0<br />
#:* special-matrix-1.0.7<br />
#:* spline-gcvspl-1.0.8<br />
#:* splines-1.0.7<br />
#:* statistics-1.1.0_svn20120128<br />
#:* strings-1.0.7<br />
#:* struct-1.0.9<br />
#:* symband-1.0.10<br />
#:* symbolic-1.1.0<br />
#:* tcl-octave-0.1.8<br />
#:* time-1.0.9<br />
#:* tsa-4.1.1<br />
#:* video-1.0.2_patched<br />
#:* vrml-1.0.12_svn20111014_patched<br />
#:* windows-1.1.0<br />
#:* xraylib-1.0.8<br />
#:* zenity-0.5.7<br />
#:<br />
#*'''Maintainer:''' Nitzan Arazi<br />
#*'''Latest update:''' 2012-03-03<br />
<br />
===Manual installation instructions===<br />
#Create an installation directory of which doesn't have space chars (i.e. C:\Octave\Octave3.6.1_gcc4.6.2\). This directory is referred hereafter as <your_install_dir>.<br />
#Extract the complete directories tree from Octave3.6.1_gcc4.6.2_20120303.7z to the installation directory keeping the original directory structure as in the archive (you can use 7-zip tool from http://www.7-zip.org/). Note that the archive contains Octave3.6.1_gcc4.6.2 folder, so you want to extract to the *parent* of <your_install_dir>.<br />
#Copy octave3.6.1_gcc4.6.2.lnk to any convenient location and edit its properties respectively to point to <your_install_dir>\bin\octave.exe and <your_install_dir>\share\octave\3.6.1\imagelib\octave-logo.ico as an icon<br />
#Copy octave3.6.1_gcc4.6.2_docs.lnk to any convenient location and edit its properties respectively to point to <your_install_dir>\doc\octave and <your_install_dir>\share\octave\3.6.1\imagelib\octave-logo.ico as an icon.<br />
#:At this point you can:<br />
#: a. Launch and use octave by double-clicking the copied octave3.6.1_gcc4.6.2.lnk<br />
#: b. Access and browse the documentation files by double-clicking the copied octave3.6.1_gcc4.6.2_docs.lnk<br />
#Optional libblas dll replacement for optimizing the linear algebra subroutines for your CPU:<br />
#:* The default configuration should automatically detect your cpu architecture and select an appropriately tuned library. <br />
#:* In case the default library is not properly functioning on the actual cpu, or you wish to explore the performance with another library, you can manually replace the default one by performing the following procedures (where libblas.dll.<libblas_source> should be replaced with the full name of the desired library from the list below these instructions):<br />
#:*# Exit octave<br />
#:*# Delete <your_install_dir>\bin\libblas.dll<br />
#:*# Make a copy of the desired <your_install_dir>\bin\libblas.dll.<libblas_source><br />
#:*# Rename the copy of the desired <your_install_dir>\bin\libblas.dll.<libblas_source> to libblas.dll<br />
#:* The following is a list of the available libblas.dll.<libblas_source> options:<br />
#:*# libblas.dll.ref - reference blas implementation, very slow but most stable<br />
#:*# libblas.dll.libopenblas_dynamicarch-r0.1alpha2.5-0-fda39c6 - Openblas based, up to 2 threads, detects cpu architecture and selects respective lib<br />
#:*# libblas.dll.libopenblas_dynamicarch_nt4-r0.1alpha2.5-0-fda39c6 - Openblas based, up to 4 threads, detects cpu architecture and selects respective lib<br />
#:*# libblas.dll.libopenblas_nehalemp-r0.1alpha2.5-0-fda39c6 - Openblas based, up to 2 threads, tuned for nehalem cpu architecture<br />
#:*# libblas.dll.libopenblas_nehalemp_nt4-r0.1alpha2.5-0-fda39c6 - Openblas based, up to 4 threads, tuned for nehalem cpu architecture<br />
#:*# libblas.dll.libopenblas_core2p-r0.1alpha2.5-0-fda39c6 - Openblas based, up to 2 threads, tuned for core2 cpu architecture<br />
#:*# libblas.dll.libopenblas_core2p_nt4-r0.1alpha2.5-0-fda39c6 - Openblas based, up to 4 threads, tuned for core2 cpu architecture<br />
#:*# libblas.dll.altas-3.8.4_ht-pentium - ATLAS based libblass, tuned for older ht-pentium (compiled by Tatsuro Matsuka)<br />
#:*# libblas.dll.altas-3.8.4_corei5 - ATLAS based libblass, tuned for older core i5 cpu (compiled by Tatsuro Matsuka)<br />
<br />
===Manual installation instructions for the Octave-forge packages===<br />
#Extract the complete directories tree from Octave3.6.1_gcc4.6.2_pkgs_20120303.7z to the installation directory (<your_install_dir>) keeping the original directory structure as in the archive (you can use 7zip tool from http://www.7-zip.org/).<br />
#In order to update octave_packages database with your installation tree and auto-load most packages (excluding 'ad' and 'windows' which may crash octave when loaded and 'clear all' is executed), launch Octave and execute the following 3 rebuild commands from the octave console:<br />
pkg rebuild -auto<br />
pkg rebuild -noauto ad windows<br />
pkg rebuild -noauto nan % shadows many statistics functions<br />
pkg rebuild -noauto gsl % shadows some core functions<br />
pkg rebuild -auto java<br />
#: Last pkg rebuild command is required in order for the java pkg entry to be moved to the top of <your_install_dir>\share\octave\octave_packages db file - thus java pkg is loaded before io pkg is loaded, and io pkg related jars are added to java class path.<br />
#You can optionally adjust your installed packages status per your specific needs and usage by executing the following commands:<br />
: a. To interactively load or unload a package<br />
pkg load <pkg_name><br />
: or<br />
pkg unload <pkg_name><br />
: b. To disable auto-load for specific pkg <pkg_name><br />
pkg rebuild -noauto <pkg_name><br />
: c. To enable auto-load for specific pkg <pkg_name><br />
pkg rebuild -auto <pkg_name><br />
: d. To completely uninstall a package<br />
pkg uninstall <pkg_name><br />
===Optional installation of Notepad++ as an editor (recommended)===<br />
#Download recent Notepad++ installation package from http://notepad-plus-plus.org/ and install it on your system.<br />
#Edit <your_install_dir>\share\octave\site\m\startup\octaverc and un-comment the line which sets octave default editor:<br />
EDITOR('C:\Program Files\Notepad++\notepad++.exe');<br />
edit ("editor", sprintf ("%s %%s", EDITOR ()))<br />
edit mode async<br />
: Note: You may adjust the above line for the location of notepad++.exe as installed on your system.<br />
<br />
===Troubleshooting===<br />
Upon launching, some warnings may be displayed. These warnings can be ignored.<br />
*Following warnings are about missing external tools which may reduce some of the functions of some packages. These external tools are not provided by the 7z archives in sourceforge. <br />
warning: gmsh does not seem to be present some functionalities will be disabled <br />
warning: dx does not seem to be present some functionalities will be disabled <br />
*Following warning is about fstat function of the statistics package that overloads the old (to be deprecated) fstat function of octave-3.6.1 <br />
warning: function C:\Octave\3.6.1_gcc-4.6.2\share\octave\packages\statistics-1.1.0\fstat.m shadows a core library function<br />
<br />
==Octave-3.6.0-mingw + octaveforge pkgs==<br />
<br />
===Files for manual installation===<br />
<br />
#Octave-3.6.0-mingw binaries tree<br />
#* Octave3.6.0_gcc4.6.2_20120129.7z - MD5:53E4823B0DC5F2923C4CBCB8B60FC1B6<br />
#: This is a 7z archive which includes a directory tree of all the binaries and libraries required for a complete octave installation (excluding octaveforge packages)<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.0%20for%20Windows%20MinGW%20installer/Octave3.6.0_gcc4.6.2_20120129.7z/download octave forge]<br />
#:<br />
#* The archive include:<br />
#:* octave-3.6.0 including PDF documentation (built by Tatsuro Matsuka http://www.tatsuromatsuoka.com/octave/Eng/Win/)<br />
#:* mingw32 + msys tool chain<br />
#:* gnuplot-4.4.4<br />
#:* fig2dev-3.2.5c<br />
#:* ghostscript-9.0.4<br />
#:* pstoedit-3.60<br />
#:<br />
#*'''Maintainer:''' Nitzan Arazi<br />
#*'''Latest update:''' 2012-01-29<br />
#Octaveforge pkgs, built for Octave-3.6.0-mingw<br />
#* Octave3.6.0_gcc4.6.2_pkgs_20120128.7z - MD5:93CC6207EED411BCE747193D3A8B6625<br />
#:<br />
#: It can be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.0%20for%20Windows%20MinGW%20installer/Octave3.6.0_gcc4.6.2_pkgs_20120128.7z/download octave forge]<br />
#:<br />
#: This is a 7z archive which includes additional binaries and libraries for a set of octaveforge packages.<br />
#:<br />
#* The included packages are:<br />
#:* actuarial-1.1.0<br />
#:* ad-1.0.6_patched<br />
#:* audio-1.1.4<br />
#:* benchmark-1.1.1<br />
#:* bim-1.0.2<br />
#:* bioinfo-0.1.2<br />
#:* civil-engineering-1.0.7<br />
#:* combinatorics-1.0.9<br />
#:* communications-1.1.0_svn20120127_patched<br />
#:* control-2.2.4<br />
#:* data-smoothing-1.2.3<br />
#:* dataframe-0.8.2<br />
#:* econometrics-1.0.8<br />
#:* fenv-0.1.0<br />
#:* financial-0.3.2<br />
#:* fpl-1.2.0<br />
#:* fuzzy-logic-toolkit-0.3.0<br />
#:* ga-0.9.8<br />
#:* general-1.2.2<br />
#:* generate_html-0.1.3<br />
#:* geometry-1.4.0<br />
#:* gnuplot-1.0.1<br />
#:* gpc-0.1.7<br />
#:* gsl-1.0.8<br />
#:* ident-1.0.7<br />
#:* image-1.0.15<br />
#:* informationtheory-0.1.8<br />
#:* integration-1.0.7_svn20120128<br />
#:* io-1.0.16<br />
#:* irsa-1.0.7<br />
#:* java-1.2.8_patched<br />
#:* linear-algebra-2.1.0_svn20120127<br />
#:* mapping-1.0.7<br />
#:* mechanics-1.2.0<br />
#:* miscellaneous-1.0.11_svn20120127<br />
#:* missing-functions-1.0.2<br />
#:* msh-1.0.2<br />
#:* multicore-0.2.15<br />
#:* nlwing2-1.2.0<br />
#:* nnet-0.1.13<br />
#:* nurbs-1.3.5<br />
#:* ocs-0.1.3_svn20120128_patched<br />
#:* octclip-1.0.0<br />
#:* octgpr-1.2.0<br />
#:* odebvp-1.0.6<br />
#:* odepkg-0.8.0_svn20120127<br />
#:* optim-1.0.17_patched<br />
#:* optiminterp-0.3.4_svn20120128_patched<br />
#:* outliers-0.13.9<br />
#:* physicalconstants-0.1.7<br />
#:* plot-1.1.0<br />
#:* quaternion-1.0.0<br />
#:* secs1d-0.0.8<br />
#:* secs2d-0.0.8<br />
#:* secs3d-0.0.1<br />
#:* signal-1.1.2<br />
#:* simp-1.1.0<br />
#:* sockets-1.0.7_svn20120128_patched<br />
#:* specfun-1.1.0<br />
#:* special-matrix-1.0.7<br />
#:* spline-gcvspl-1.0.8<br />
#:* splines-1.0.7<br />
#:* statistics-1.1.0_svn20120128<br />
#:* strings-1.0.7<br />
#:* struct-1.0.9<br />
#:* symband-1.0.10<br />
#:* symbolic-1.1.0<br />
#:* tcl-octave-0.1.8<br />
#:* time-1.0.9<br />
#:* tsa-4.1.1<br />
#:* video-1.0.2_patched<br />
#:* vrml-1.0.12_svn20111014_patched<br />
#:* windows-1.1.0<br />
#:* xraylib-1.0.8<br />
#:* zenity-0.5.7<br />
#:<br />
#*'''Maintainer:''' Nitzan Arazi<br />
#*'''Latest update:''' 2012-01-28<br />
<br />
===Manual installation instructions===<br />
#Create an installation directory of which doesn't have space chars (i.e. C:\Octave\Octave3.6.0_gcc4.6.2\). This directory is referred hereafter as <your_install_dir>.<br />
#Extract the complete directories tree from Octave3.6.0_gcc4.6.2_20120129.7z to the installation directory keeping the original directory structure as in the archive (you can use 7-zip tool from http://www.7-zip.org/).<br />
#Copy octave3.6.0_gcc4.6.2.lnk to any convenient location and edit its properties respectively to point to <your_install_dir>\bin\octave.exe and <your_install_dir>\share\octave\3.6.0\imagelib\octave-logo.ico as an icon<br />
#Copy octave3.6.0_gcc4.6.2_docs.lnk to any convenient location and edit its properties respectively to point to <your_install_dir>\doc\octave and <your_install_dir>\share\octave\3.6.0\imagelib\octave-logo.ico as an icon.<br />
#:At this point you can:<br />
#: a. Launch and use octave by double-clicking the copied octave3.6.0_gcc4.6.2.lnk<br />
#: b. Access and browse the documentation files by double-clicking the copied octave3.6.0_gcc4.6.2_docs.lnk<br />
===Manual installation instructions for the Octave-forge packages===<br />
#Extract the complete directories tree from Octave3.6.0_gcc4.6.2_pkgs_20120128.7z to the installation directory (<your_install_dir>) keeping the original directory structure as in the archive (you can use 7zip tool from http://www.7-zip.org/).<br />
#In order to update octave_packages database with your installation tree and auto-load most packages (excluding 'ad' and 'windows' which may crash octave when loaded and 'clear all' is executed), launch Octave and execute the following 3 rebuild commands from the octave console:<br />
pkg rebuild -auto<br />
pkg rebuild -noauto ad windows<br />
pkg rebuild -auto java<br />
#: Last pkg rebuild command is required in order for the java pkg entry to be moved to the top of <your_install_dir>\share\octave\octave_packages db file - thus java pkg is loaded before io pkg is loaded, and io pkg related jars are added to java class path.<br />
#You can optionally adjust your installed packages status per your specific needs and usage by executing the following commands:<br />
: a. To interactively load or unload a package<br />
pkg load <pkg_name><br />
: or<br />
pkg unload <pkg_name><br />
: b. To disable auto-load for specific pkg <pkg_name><br />
pkg rebuild -noauto <pkg_name><br />
: c. To enable auto-load for specific pkg <pkg_name><br />
pkg rebuild -auto <pkg_name><br />
: d. To completely uninstall a package<br />
pkg uninstall <pkg_name><br />
===Optional installation of Notepad++ as an editor (recommended)===<br />
#Download recent Notepad++ installation package from http://notepad-plus-plus.org/ and install it on your system.<br />
#Edit <your_install_dir>\share\octave\site\m\startup\octaverc and un-comment the line which sets octave default editor:<br />
EDITOR('C:\Program Files\Notepad++\notepad++.exe');<br />
edit ("editor", sprintf ("%s %%s", EDITOR ()))<br />
edit mode async<br />
: Note: You may adjust the above line for the location of notepad++.exe as installed on your system.<br />
<br />
===Troubleshooting===<br />
Upon launching, some warnings may be displayed. These warnings can be ignored.<br />
*Following warnings are about missing external tools which may reduce some of the functions of some packages. These external tools are not provided by the 7z archives in sourceforge. <br />
warning: gmsh does not seem to be present some functionalities will be disabled <br />
warning: dx does not seem to be present some functionalities will be disabled <br />
*Following warning is about fstat function of the statistics package that overloads the old (to be deprecated) fstat function of octave-3.6.0 <br />
warning: function C:\Octave\3.6.0_gcc-4.6.2\share\octave\packages\statistics-1.1.0\fstat.m shadows a core library function<br />
<br />
==Octave-3.4.3-mingw + octaveforge pkgs==<br />
<br />
#Octave-3.4.3-mingw (without pkgs)<br />
#: Octave3.4.3_gcc4.5.2_20111025.7z - MD5:5AA004D933E000E762AE2AE95573ACBD - http://www.multiupload.com/KDQ1N463UW <br />
#Octaveforge pkgs, built for Octave-3.4.3-mingw<br />
#: Octave3.4.3_gcc4.5.2_pkgs_20111026.7z - MD5:2987F6078B4AD161F2D23634D5109D61 - http://www.multiupload.com/7U6J23CSZ6 <br />
:<br />
:The above archive files are now able to be downloaded from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.4.3%20for%20Windows%20MinGW%20Installer/ octave forge]<br />
*'''Maintainer:''' Nitzan Arazi<br />
*'''Latest update:''' 2011-10-26<br />
*Packages are archived by 7zip. 7zip software can be download from http://www.7-zip.org/<br />
*Octave Binaries are built using Tatsuro Matsuka OctaveLibs.zip and gplibs.zip (http://www.tatsuromatsuoka.com/octave/Eng/Win/)<br />
<br />
===Troubleshooting===<br />
Upon launching, some warnings may be displayed. The following warnings can be ignored:<br />
*Following warning is about interpretation of logical operators (on scalars) in octave which is slightly different than matlab's interpretation. <br />
warning: C:\Octave\3.4.3_gcc-4.5.2\share\octave\packages\integration-1.0.7\PKG_ADD: possible Matlab-style short-circuit operator<br />
at line 9, column 32 <br />
*Following messages are from java package about loading of java classes that have been found and how to manually run a statement which will display its capabilities. <br />
io PKG_ADD: java classes has been found and added in C:\Octave\3.4.3_gcc-4.5.2\bin <br />
io PKG_ADD: run chk_spreadsheet_support([],3) to view io support <br />
*Following warnings are about missing external tools which may reduce some of the functions of some packages. These external tools are not provided by the 7z archives in sourceforge. <br />
warning: gmsh does not seem to be present some functionalities will be disabled <br />
warning: dx does not seem to be present some functionalities will be disabled <br />
*Following warning is about fstat function of the statistics package that overloads the old (to be deprecated) fstat function of octave-3.4.3 <br />
warning: function C:\Octave\3.4.3_gcc-4.5.2\share\octave\packages\statistics-1.0.10\fstat.m shadows a core library function<br />
<br />
==Octave-3.4.2-mingw + octaveforge pkgs==<br />
#Octave-3.4.2-mingw (without pkgs)<br />
#:Octave3.4.2_gcc4.5.2_20110914.7z - MD5:4AA0DD4C97F73B2E9E0F7370CD8AD719 - http://www.multiupload.com/TCUHKNNH9S <br />
#Octaveforge pkgs, built for Octave-3.4.2-mingw<br />
#:Octave3.4.2_gcc4.5.2_pkgs_20111014.7z - MD5:49097AF3C6FC6CDB58EE83F510A50993 - http://www.multiupload.com/DCWFZOUGZA <br />
*'''Maintainer:''' Nitzan Arazi<br />
*'''Latest update:''' 2011-10-14<br />
*Packages are archived by the 7zip. The 7zip software can be download from http://www.7-zip.org/<br />
*Octave Binaries are built by Tatsuro Matsuoka (http://www.tatsuromatsuoka.com/octave/Eng/Win/)<br />
*Octave manual (<code>octave-3.4.2.pdf.zip, octave-3.4.2.html.zip</code>) can be downloaded from http://www.tatsuromatsuoka.com/octave/Eng/Win/<br />
<br />
===Installation===<br />
<br />
The installation instructions are the same as for the 3.4.3 version, above.<br />
<br />
===Notes===<br />
For details, please see http://old.nabble.com/Octave-3.4.2-mingw-%2B-octaveforge-pkgs-to32394771.html<br />
<br />
Upon launching, some warnings may be displayed. The following warnings can be ignored:<br />
*Following warning is about interpretation of logical operators (on scalars) in octave which is slightly different than matlab's interpretation. <br />
warning: C:\Octave\Octave3.4.2_gcc4.5.2\share\octave\packages\integration-1.0.7\PKG_ADD: possible Matlab-style <br />
short-circuit operator at line 9, column 32<br />
*Following warnings are about missing external tools which may reduce some of the functions of some packages. These external tools are not provided by the 7z archives in sourceforge. <br />
warning: gmsh does not seem to be present some functionalities will be disabled<br />
warning: dx does not seem to be present some functionalities will be disabled<br />
*Following warning is about fstat function of the statistics package that overloads the old (to be deprecated) fstat function of octave-3.4.3 <br />
warning: function C:\Octave\Octave3.4.2_gcc4.5.2\share\octave\packages\statistics-1.0.10\fstat.m shadows a core library<br />
<br />
<br />
==Octave 3.2.4 for Windows MinGW32==<br />
<br />
*'''Download:''' [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.2.4%20for%20Windows%20MinGW32%20Installer/Octave-3.2.4_i686-pc-mingw32_gcc-4.4.0_setup.exe/download Octave-3.2.4_i686-pc-mingw32_gcc-4.4.0_setup.exe]<br />
*'''Maintainer:''' Benjamin Lindner <br />
*'''Latest release:''' 2010-03-25<br />
<br />
===Includes===<br />
<br />
*GNU Octave, version 3.2.4 (i686-pc-mingw32)<br />
*atlas 3.8.2<br />
*mingw32 (GCC 4.4.0 on http://www.mingw.org )<br />
*gnuplot Version 4.4.0 specially prepared for octave<br />
*mini-MSYS 1.0.11<br />
*notepad++ 5.6.7 as text editor<br />
*Some components of octave-forge packages <br />
**actuarial-1.1.0 (New!) <br />
**audio-1.1.4 <br />
**benchmark-1.1.1 <br />
**bim-1.0.0 (New!) <br />
**bioinfo-0.1.2 <br />
**combinatorics-1.0.9 <br />
**communications-1.0.10 <br />
**control-1.0.11 <br />
**data-smoothing-1.2.0 <br />
**econometrics-1.0.8 <br />
**fenv-0.1.0 (New!) <br />
**financial-0.3.2 <br />
**fixed-0.7.10 <br />
**fpl-1.0.0 (New!) <br />
**ga-0.9.7 <br />
**general-1.2.0 (updated) <br />
**generate_html-0.1.2 (New!) <br />
**gnuplot-1.0.1 (New!) <br />
**gpc-0.1.7 <br />
**gsl-1.0.8 <br />
**ident-1.0.7 <br />
**image-1.0.10 <br />
**informationtheory-0.1.8 <br />
**integration-1.0.7 <br />
**io-1.0.11 (updated) <br />
**irsa-1.0.7 <br />
**java-1.2.7 (New!) <br />
**jhandles-0.3.5 (New!) <br />
**linear-algebra-1.0.8 <br />
**mapping-1.0.7 <br />
**miscellaneous-1.0.9 <br />
**missing-functions-1.0.2 <br />
**msh-1.0.0 (New!) <br />
**nlwing2-1.1.1 (New!) <br />
**nnet-0.1.10 <br />
**nurbs-1.0.3 (New!) <br />
**ocs-0.0.4 (New!) <br />
**oct2mat-1.0.7 (New!) <br />
**octcdf-1.0.17 (updated 1.0.17+) <br />
**octgpr-1.1.5 (New!) <br />
**odebvp-1.0.6 <br />
**odepkg-0.6.10 (updated) <br />
**optim-1.0.12 (updated) <br />
**optiminterp-0.3.2 <br />
**outliers-0.13.9 <br />
**physicalconstants-0.1.7 <br />
**plot-1.0.7 <br />
**quaternion-1.0.0 <br />
**signal-1.0.10 <br />
**simp-1.1.0 (New!) <br />
**sockets-1.0.5 <br />
**specfun-1.0.8 <br />
**special-matrix-1.0.7 <br />
**spline-gcvspl-1.0.8 (New!) <br />
**splines-1.0.7 <br />
**statistics-1.0.9 <br />
**strings-1.0.7 <br />
**struct-1.0.7 <br />
**symband-1.0.10 (New!) <br />
**symbolic-1.0.9 <br />
**time-1.0.9 <br />
**video-1.0.2 (New!) <br />
**windows-1.0.8(updated to 1.0.8+) <br />
**zenity-0.5.7<br />
<br />
===Notes===<br />
*Although there are some remaining known issues, some bugs reported to the octave-3.2.3 have been corrected. In addition, useful octave-forge packages are added (Java, Jhandles, ....). Please see [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.2.4%20for%20Windows%20MinGW32%20Installer/RELEASE_NOTES-3.2.4.txt/download RELEASE_NOTES.txt] for details: <br />
*Default Octave install folder changed to e.g. <code>C:\Octave\3.2.4_gcc-4.4.0\</code>. <br />
*:If you have installed octave in a folder where the path name has whitespace, for example, <code>C:\Program Files\</code>, 'pkg install (package name)' command '''will fail''': See http://sourceforge.net/mailarchive/message.php?msg_name=4A1AF9EF.1000005@hotmail.com for details<br />
<br />
'''Additional important topics found after the release:'''<br />
*It is reported that the oct2mat octave-forge package affects plot related commands. The purpose of the package is to convert m-file into matlab-compatible coding style. Please see the documentation of the octave-forge (oct2mat - freetb4matlab) from http://octave.sourceforge.net/functions_by_package.php) <br />
**Report for this problem: http://old.nabble.com/Re:-Octave-3.2.4-mingw32-available-p28053703.html <br />
**Explanation of the problem: http://old.nabble.com/Re:-Octave-3.2.4-mingw32-available-p28090303.html <br />
**Realistic solution at this moment, do not install the oct2mat package when you install octave with octave-forge packages if you do not use this package. Another solution is to execute<br />
pkg rebuild -noauto oct2mat<br />
::at the octave prompt and then restart octave. The operation results in the oct2mat package not to be auto-loaded in startup. When you want to use oct2mat, execute <br />
pkg load oct2mat <br />
*The plot octave-forge package still have ginput code although the ginput function is now merge into octave itself. Therefore conflict occur if the plot package is installed. To avoid this problem, rename 'ginput.m' in the folder <code>..\Octave\3.2.4_gcc-4.4.0\share\octave\packages\plot-1.0.7</code>, for example ginput.ob.m. In some computers which has one core CPU, response of ginput is very slow. In the case, modify '__gnuplot_ginput__.m' according to the following thread. http://old.nabble.com/ginput-on-Octave-3.2.4-mingw32-to28093888.html <br />
*From gnuplot-4.4.0, the default terminal of gnuplot for windows is the wxt terminal. Some users may set the GNUTERM environmental variable for the windows terminal being default. The gnuplot for windows allows to set GNUTERM to 'win' (abbreviated form) but octave does not recognize the abbreviated form for terminal name. If one would like set GNUTERM to windows terminal, one should specify it as 'windows' (full form) but not 'win' (abbreviated form). In detail see the following thread: http://old.nabble.com/flicking-problem-again-Octave-3.2.4-mingw32-td28038688.html<br />
<br />
=Octave on Cygwin=<br />
== Octave 3.8.2 on cygwin==<br />
<br />
*'''Web-Site:''' http://cygwin.com <br />
*'''Maintainer:''' Marco Atzeri <br />
*'''Latest release:''' 2014-08-17<br />
<br />
*Latest packages:<br />
<br />
:octave-3.8.2-1<br />
:Its announce on cygwin mailing list[http://www.cygwin.com/ml/cygwin-announce/2014-08/msg00033.html]<br />
<br />
:octave-forge is not anymore monolithic but splitted in the several package<br />
:Its announce on cygwin mailing list[http://cygwin.com/ml/cygwin-announce/2014-02/msg00017.html]<br />
: Full cygwin package ist is available here[https://cygwin.com/packages/]<br />
: At today 2014-08-17, 53 forge packages are available. <br />
<br />
*To install : <br />
: run cygwin setup-x86.exe (for cygwin 32 bit) or setup-x86_64.exe (for cygwin 64 bit)<br />
: and select them in the Math category. <br />
: All the package dependencies will be also installed.<br />
<br />
:Graphics is based on X and to plot you need to start octave within xterm (or similar).<br />
: I recommend to install "xinit", "xlaunch" and "gnuplot". <br />
: These packages will pull all the functional Xserver. <br />
: Otherwise the only graphics will be ASCII art ;-)<br />
<br />
===Notes===<br />
<br />
*When building from development source (default branch) <br />
: "make check" <br />
:passes almost all the tests. <br />
:Only, and not substantial, failures are:<br />
<nowiki>/pub/hg/octave/src/data.cc : 8 failures due to different handling of complex Inf on sort<br />
/pub/hg/octave/src/syscalls.cc: 1 failure on fork. This disappears when octave is installed<br />
/pub/hg/octave/scripts/sparse/svds.m: 1 failure due to test sensitivity on starting point. See <br />
https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2011-September/024715.html</nowiki><br />
<br />
*To build from cygwin source package, you need to install "cygport" and the relevant development libraries<br />
<nowiki>$ tar -xvjf octave-3.8.2-1-src.tar.bz2 <br />
$ cygport octave.cygport almostall</nowiki><br />
<br />
:see cygport documentation for further info.<br />
<br />
=Octave with Visual Studio=<br />
<br />
Octave binaries compiled with Microsoft Visual Studio are available for download from [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20Microsoft%20Visual%20Studio/ Octave-Forge site]. These binaries come in the form of an easy-to-use installer (created with [http://nsis.sourceforge.net/ NSIS]) and are provided in 2 flavors: pre-compiled version for Visual Studio 2008 and for Visual Studio 2010.<br />
<br />
These binaries do not include the Microsoft Visual C++ compiler. This must be installed separately, but is only required if you plan to compile and link source code against the pre-compiled octave release. If the Visual C++ compiler is not present on the target system, then the Visual C++ runtime libraries must be installed prior the installation of these binaries. These runtime libraries are support libraries that are required by any code compiled with the Visual C++ compiler. They can be downloaded for free from the Microsoft download site:<br />
* [http://www.microsoft.com/download/en/details.aspx?id=5582 Visual C++ 2008 runtime libraries]<br />
* [http://www.microsoft.com/download/en/details.aspx?id=8328 Visual C++ 2010 runtime libraries]<br />
Note that if you already installed other software on your system, there is a possibility that these runtime libraries are already present. Search for a files named msvcr90.dll (Visual Studio 2008) or msvcr100.dll (Visual Studio 2010) in the %WINDIR% directory (usually C:\WINDOWS).<br />
<br />
==Installation==<br />
<br />
The pre-compiled versions for Visual Studio come in the form of a self-installing executable. Simply download the executable, run it and follow the installer instructions. To avoid possible problems with white spaces in the octave paths, it is '''strongly recommended''' to install octave in a directory that do not contain any white spaces.<br />
<br />
Octave-Forge packages are not installed by default. To install packages, expand the section "Octave Forge" in the component selection page of the installer and select the packages you wish to install. Note that installed packages are not loaded by default. To use the packages, you still need to load them into octave.<br />
<br />
==Printing (installing Ghostscript)==<br />
<br />
In order to use the {{Codeline|print}} command ghostscript must be installed.<br />
The installer may be obtained at<br />
[http://sourceforge.net/projects/ghostscript/ sourceforge].<br />
<br />
The instructions below assume the GLP version of Ghostscript is installed with<br />
the Destination directory {{Codeline|<nowiki>C:\Program Files (x86)\GPLGS\</nowiki>}}.<br />
The Destination directory may be different for 32 bit and 64 bit windows and can also<br />
change for different versions of Ghostscript. Therefore, it is important that the user <br />
make note of the Destination directory used to install Ghostscript and use it in place of<br />
the Destination directory used in these instructions.<br />
<br />
In order for Octave to find Ghostscript, the directory containing Ghostscript's command line<br />
program must be in the command shell's path. The name of Ghostscript's command<br />
line program may vary. Some examples are {{Codeline|gswin32c.exe}}, {{Codeline|gswin64c.exe}}, <br />
{{Codeline|gs.exe}}, and {{Codeline|mgs.exe}}.<br />
To directory containing Ghostscript's command line program may either be added to the command<br />
shell's using Windows Control Panel, or by having Octave modify the {{Codeline|path}} variable to<br />
include the directory where Ghostscript's command line programs resides.<br />
<br />
For the latter, to following lines may be placed in the {{Codeline|<nowiki>~/.octaverc</nowiki>}}<br />
file (where {{Codeline|~}} indicates the user's home folder).<br />
The variable {{Codeline|<nowiki>gs_path</nowiki>}} should be set to the Destination<br />
directory where Ghostscript was installed.<br />
<br />
cmd_path = getenv ("path");<br />
gs_path = 'C:\Program Files (x86)\GPLGS\';<br />
if (isempty (strfind (cmd_path, gs_path)))<br />
setenv ('path', strcat (cmd_path, pathsep (), gs_path));<br />
endif<br />
<br />
In this case, the value of {{Codeline|gs_path}} has been set to the location of Ghostscript's command<br />
line program for the GPL's 8.15 version of Ghostscript. The location for other versions may differ.<br />
Please determine the location of the installed Ghostscript command line program and make the needed<br />
adjustments to these instructions.<br />
<br />
To set the path via the Control Panel,<br />
<br />
* Go to '''Control Panel''' --> '''System and Security''' --> '''System'''<br />
* Click '''Advanced System Settings'''<br />
* Click '''Environment Variables'''<br />
* In the '''System Variables''' area, locate the Path variable, highlight it and click '''Edit'''.<br />
* Add the Destination directory where Ghostscript is installed and confirm the change by clickiing '''OK''', '''OK''', '''OK'''.<br />
<br />
If the 64 bit version of Ghostscript is installed, Octave will not automatically detect it. To use the 64 bit version an<br />
option telling Octave about it must be passed to the {{Codeline|print}} command. For example to produce PDF<br />
output for a figure, using the 64 bit version of Ghostscript, the command below may be used.<br />
<br />
print -Ggswin64c.exe figure.pdf<br />
<br />
At this point most of Octave's printing functionality should work. When output is<br />
produced using the {{Codeline|print}} command the warnings below will be given.<br />
<br />
warning: print.m: epstool binary is not available.<br />
Some output formats are not available.<br />
warning: print.m: fig2dev binary is not available.<br />
Some output formats are not available.<br />
warning: print.m: pstoedit binary is not available.<br />
Some output formats are not available.<br />
<br />
For the {{Codeline|print}} command to be fully functional, each of these utilities will also need to be installed,<br />
and their locations added to the Path variable via either the Control Panel<br />
or Octave's {{Codeline|<nowiki>~/.octaverc</nowiki>}} file.<br />
<br />
==Using the Visual C++ compiler with Octave==<br />
<br />
As of version 3.6.1, the Microsoft Visual C++ compiler is not automatically detected. If you need to use it from octave (for instance to compile a MEX, OCT file, and building packages), then you must configure your system by updating the appropriate environment variables: '''%PATH%''', '''%INCLUDE%''' and '''%LIB%'''. One way to achieve this easily is to call the vcvarsall.bat script (from the Visual C++ installation directory) prior executing octave. You can for instance automate this by creating a batch script with the following content (adapt paths to your actual installation):<br />
<br />
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"<br />
"C:\Octave-3.6.1\bin\octave.exe"<br />
<br />
==Octave 3.6.4==<br />
<br />
===Download===<br />
[http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20Microsoft%20Visual%20Studio/ Octave-Forge]<br />
<br />
===Content===<br />
* Octave 3.6.4<br />
* OpenBLAS-0.2.2 (dynamic architectures, up to 4 threads)<br />
* ATLAS 3.8.4 single-threaded and multi-threaded (2 threads)<br />
* All required libraries<br />
* Gnuplot 4.4.4<br />
* FLTK<br />
* 82 packages from Octave-Forge (Must be installed through the Octave installer, see README: 3. Content)<br />
<br />
==Octave 3.6.2==<br />
<br />
===Download===<br />
[http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.2%20for%20Windows%20Microsoft%20Visual%20Studio/ Octave-Forge]<br />
<br />
===Content===<br />
* Octave 3.6.2<br />
* OpenBLAS-0.1.1 (dynamic architectures, up to 4 threads)<br />
* ATLAS 3.8.4 single-threaded and multi-threaded (2 threads)<br />
* All required libraries<br />
* [https://github.com/goffioul/QtHandles QtHandles]<br />
* Octave GUI (experimental, compiled from development sources)<br />
* Gnuplot 4.4.4<br />
* 72 packages from Octave-Forge (see README: 3. Content)<br />
<br />
==Octave 3.6.1==<br />
<br />
===Download===<br />
[http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.1%20for%20Windows%20Microsoft%20Visual%20Studio/ Octave-Forge]<br />
<br />
===Content===<br />
* Octave 3.6.1<br />
* ATLAS 3.8.4 single-threaded (SSE/SSE2/SSE3) and multi-threaded (SSE3, 2 threads)<br />
* All required libraries<br />
* [https://github.com/goffioul/QtHandles QtHandles]<br />
* Octave GUI (experimental, compiled from development sources)<br />
* Gnuplot 4.4.4<br />
* 72 packages from Octave-Forge<br />
<br />
==MXE==<br />
<br />
How to build [[Windows_Installer]] using linux.<br />
<br />
==Alternative==<br />
In addition to the instructions provided in the Octave manual and Octave-Forge repository, a basic toolkit for building Octave in windows using the MSVC compiler has been produced by Michael Goffioul. It consists of a set of scripts that can be used to compile Octave and its dependencies. <br />
<br />
A pre-compiled (with VS2010) version of everything has also been provided, so it is not necessary to recompile everything from scratch. The files can be found at: http://dl.dropbox.com/u/45539519/octave-build2.zip and http://dl.dropbox.com/u/45539519/VC10Libs.zip<br />
<br />
Note that this is not a enterprise-level SDK, so don't try to start an enterprise with it.<br />
<br />
<br />
<br />
[[Category:Installation]]<br />
[[Category:Building]]<br />
[[Category:Microsoft Windows]]</div>109.205.67.254