Senin, 25 Juni 2018

Sponsored Links

GNU Octave â€
src: www.opensourceimaging.org

GNU Octave is software featuring high level programming languages, primarily intended for numerical calculations. Octave helps solve linear and non-linear problems numerically, and to perform other numerical experiments using languages ​​most of which are compatible with MATLAB. It can also be used as a batch oriented language. Since this is part of the GNU Project, it is free software under the terms of the GNU General Public License.

Octave is one of the main free alternatives to MATLAB, others are SciLab and FreeMat. Scilab, however, puts less emphasis on (two way) syntactic compatibility with MATLAB than is done by Octave.


Video GNU Octave



Histori

The project was composed around 1988. Originally intended to be a chemical reactor design course companion. The real development was started by John W. Eaton in 1992. The first alpha release started on 4 January 1993 and on 17 February 1994 version 1.0 was released. Version 4.0.0 was released on May 29, 2015.

The program is named after Octave Levenspiel, a former professor of lead author. Levenspiel is known for its ability to perform quick calculations behind envelopes.

Maps GNU Octave



Developments

In addition to being used on desktops for personal scientific computing, Octave is used in academia and industry. For example, Octave is used on massive parallel computers at the Pittsburgh Supercomputing Center to find vulnerabilities associated with guessing social security numbers.

Dramatic acceleration with OpenCL or CUDA is also possible with GPU usage.

Introduction to GNU Octave - YouTube
src: i.ytimg.com


Technical details

  • Octaves are written in C using standard C library.
  • Oktave uses an interpreter to execute an Octave script language.
  • Octaves can be expanded using dynamically loaded modules.
  • The octave translator has an OpenGL graphics engine for plotting, graphics, charting and storing or printing. Alternatively, gnuplot can be used for the same purpose.
  • Octave includes a Graphical User Interface (GUI) in addition to the traditional Command Line Interface (CLI); see the #User interface for details.

GNU Octave â€
src: www.opensourceimaging.org


Octave, language

Octave is an interpreted programming language. It is a structured programming language (similar to C) and supports many common C library standard functions, as well as certain UNIX system calls and functions. However, it does not support arguments by reference.

The Octave program consists of a list of function calls or scripts. The syntax is matrix based and provides various functions for matrix operations. It supports various data structures and enables object-oriented programming.

The syntax is very similar to MATLAB, and careful script programming will allow it to run in both Octave and MATLAB.

Since Octave is available under the GNU General Public License, Octave can be freely modified, copied, and used. The program runs on Microsoft Windows and most Unix and Unix-like operating systems, including macOS.

Octave | giftsforsubs
src: www.valuewalk.com


Important features

Command and variable name completion

Typing TAB characters on the command line causes Octave to try to resolve variables, functions, and filenames (similar to the completion of the Bash tab). Octave uses the text before the cursor as the beginning of the name to complete.

Command history

When running interactively, Octave stores commands that are typed in an internal buffer so that they can be called and edited.

Data Structure

Octave includes a limited amount of support for organizing data in the structure. In this example, we see the "x" structure with elements "a", "b", and "c", (integer, array, and string, respectively):

Boolean short circuit operator

Logical operators' & amp; 'and' || 'in the UK is evaluated in short-circuit mode (such as the corresponding operator in C language), in contrast to element-by-element operators' & amp; 'and' | '.

Operator additions and subtraction

Octave includes the increase and decrease C operators like ' ' and ' - ' in both the prefix and postfix form. Octaves also add tasks, e.g. ' x = 5 '.

Unwind-protect

Octave supports a limited handling exception form modeled after Lisp's ' unwind_protect '. The general shape of the unwind_protect block looks like this:

As a general rule, GNU Octave recognizes the termination of a 'code' block 'either keyword' end '(compatible with MATLAB language) or keywords which is more specific ' end_ block '. As a result, the ' unwind_protect ' block may end with either ' end_unwind_protect ' as in the example, or with more portable keywords' end '.

The cleaning section of this block is always running. If an exception is raised by the body section, cleanup runs immediately before distributing the exception outside of the ' unwind_protect block.

GNU Octave also supports other forms of exception handling (compatible with MATLAB languages):

This latter form differs from the ' unwind_protect ' block in two ways. First, exception_handling is only executed when an exception is raised by body . Secondly, after exception_handling execution is not propagated outside the block (unless ' rethrow (lasterror) ' is explicitly entered into exception_handling code).

List of arguments of variable length

Octave has a mechanism for handling functions that take an unlimited number of arguments with no explicit upper limit. To specify a list of zeroes or more arguments, use the varargin custom argument as the last (or only) argument in the list.

List of variable-length returns

A function can be set to return a number of values ​​by using a special return value varargout . As an example:

Integration C

It is also possible to execute Octave code directly in C program. For example, here is a snippet of code to call rand ([10,1]) :

Codes C and C can be integrated into GNU Octave by creating oct files, or using compatible MEX MATLAB files.

File:Octave GUI 3 8.jpg - Wikimedia Commons
src: upload.wikimedia.org


MATLAB compatibility

Octave has been built with MATLAB compatibility in mind, and shares many features with MATLAB:

  1. The matrix as the fundamental data type.
  2. Internal support for complex numbers.
  3. Strong built-in math functions and extensive function library.
  4. Extensibility in user defined function.

Octave treats mismatch with MATLAB as a bug; therefore, may be considered a software clone, which does not infringe copyrighted software such as court case Lotus v. Borland .

The MATLAB script from the FileExchange MathWorks repository is principally compatible with Octave. However, while they are often provided and uploaded by users under a BSD compatible and compatible Open source license, FileEchange Terms of Use prohibit any use in addition to MATWAB's MATLAB.

Syntax compatibility

There are some syntactic additions that are of little use, though small:

  1. The comment line can start with the # character as well as the% character;
  2. Various operators based on C, -, =, * =,/= supported;
  3. Elements can be referenced without creating new variables with unmarked indexing, e.g. [1:10] (3);
  4. Strings can be defined with "double quote and single-quote characters" characters;
  5. When a single variable type (single precision floating-point number), Octaf calculates "mean" in a single domain (MATLAB in a double domain) that is faster but gives less accurate results;
  6. Blocks can also end with more specific Control structure keywords, ie, endif, endfor, endwhile, etc.;
  7. Functions can be defined in scripts and in the Octave command;
  8. The presence of a do-up loop (similar to do-while in C).

Compatibility function

Many of the various MATLAB functions are available in GNU Octave, some of which are accessible via packets via Octave-forge, but not all MATLAB functions are available in GNU Octave. A list of functions not available exists in Octave, and the developer seeks help to implement it. Search for __unimplemented.m__ function, leading to list of functions not implemented.

Unimplemented functions are also categorized in Image, Mapping, Optimization, Signal, and Statistics packages.

When a function that is not implemented is called the following error message is displayed:

GNU Octave â€
src: www.opensourceimaging.org


User interface

Octave comes with an official graphical user interface (GUI) and an integrated development environment (IDE) based on Qt. It's available since Octave 3.8, and has become the default interface (via command line interface) with Octave 4.0 release. Several front-ends of third-party graphics have been developed. It's well received: "[Octave] now has a very workable GUI."

Installing GNU Octave on PC with the Symbolic Package - Part 2 of ...
src: i.ytimg.com


GUI app

With the Octave code, users can create a GUI app [1]. Here are some examples.

Button, edit control, checkbox

Writing column

Listbox with mailbox.

Radio button

An advanced example of the composition of the Octaf GUI app can be seen in the FEATool Multiphysics FEM simulation toolbox.

GNU Octave Logo
src: ih0.redbubble.net


Packages

Source of the article : Wikipedia

Comments
0 Comments