Tools/Octave Matlab

From UIT
(Difference between revisions)
Jump to: navigation, search
(Installation)
 
(One intermediate revision by one user not shown)
Line 31: Line 31:
  
 
=== Windows ===
 
=== Windows ===
There is full page at the [http://wiki.octave.org/Main_Page Octave wiki] about how to [http://wiki.octave.org/Octave_for_Windows install Octave on Windows] with different installers, compilers and versions. After trying some of the variants, we found out that the easiest way is to download the latest version for MinGW at [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/ Sourceforge] ([http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.2%20for%20Windows%20MinGW%20installer/ current version of writing this article: 3.6.2]) or from [[User:Guo|guo]]'s [ftp://fpga:fpga@153.109.5.248 Software Server]. There are two compressed files, one with Octave itself and one with various useful packages ([http://octave.sourceforge.net/functions_by_alpha.php alphabetical list of all functions]). We recommend to install the packages also. To install just uncompress the files and follow the instructions in the ''readme'' files.
+
There is full page at the [http://wiki.octave.org/Main_Page Octave wiki] about how to [http://wiki.octave.org/Octave_for_Windows install Octave on Windows] with different installers, compilers and versions. After trying some of the variants, we found out that the easiest way is to download the latest version for MinGW at [http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/ Sourceforge] ([http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.2%20for%20Windows%20MinGW%20installer/ current version of writing this article: 3.6.2]) or from [[User:oliver.gubler|guo]]'s [ftp://fpga:fpga@153.109.5.248 Software Server]. There are two compressed files, one with Octave itself and one with various useful packages ([http://octave.sourceforge.net/functions_by_alpha.php alphabetical list of all functions]). We recommend to install the packages also. Simply uncompress the files and follow the instructions in the ''readme'' files.

Latest revision as of 15:18, 24 April 2015

Contents

MATLABis a numerical computing environment and programming language developed by MathWorks. GNU Octave is a free software under the terms of the GNU General Public License (GPL) using a language that is mostly compatible with MATLAB.

Syntax differences

In general the MATLAB syntax is stricter than Octave. Therefore it is recommended to use the MATLAB syntax for compatibility. The most notable restrictions in MATLAB compared to Octave are:

Type Octave MATLAB
String delimiters ' or " only '
Ends can use end{if,for,...} only end
Comment # or % only %
Hexadecimal supports 0xF0 needs hex2dec('F0')
Autoincrement and Assign supports i++; ++i; i+=1; etc. no support
Logical Operator NOT  ! or ~ only ~ (as used in: Not Equal: ~=)

a full list of differences is maintained in the MATLAB Programming Wikibook.

Octave

Installation

Octave is mainly built for Linux and is therefore packaged for many distributions, but it can also be installed on OS X and Windows. To test your installation in a quick and easy manner you could try to print a sinusoidal wave:

t = linspace(0, 10, 100);
plot(t, sin(t));

Windows

There is full page at the Octave wiki about how to install Octave on Windows with different installers, compilers and versions. After trying some of the variants, we found out that the easiest way is to download the latest version for MinGW at Sourceforge (current version of writing this article: 3.6.2) or from guo's Software Server. There are two compressed files, one with Octave itself and one with various useful packages (alphabetical list of all functions). We recommend to install the packages also. Simply uncompress the files and follow the instructions in the readme files.

Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox