FAQ: Difference between revisions

Jump to navigation Jump to search
11 bytes removed ,  12 May 2020
m
Make punctuations left aligned.
m (Make punctuations left aligned.)
Line 28: Line 28:
==Who uses Octave?==
==Who uses Octave?==


A huge number of people ranging from students to researchers involved in various fields such as statistics,Machine Learning, data analytics, etc   . Universities use it for research and teaching, companies of all sizes for development and individuals for certain private purposes. See [[Who Uses Octave?]] for more clarity .
A huge number of people ranging from students to researchers involved in various fields such as statistics,Machine Learning, data analytics, etc. Universities use it for research and teaching, companies of all sizes for development and individuals for certain private purposes. See [[Who Uses Octave?]] for more clarity.


==Who develops Octave?==
==Who develops Octave?==
Line 42: Line 42:
The [https://www.gnu.org/ GNU Project] was launched in 1984 to develop a complete Unix-like operating system which is free software: the GNU system.  GNU is a recursive acronym for "GNU's Not Unix"; it is pronounced [https://www.gnu.org/gnu/pronunciation.en.html g'noo].
The [https://www.gnu.org/ GNU Project] was launched in 1984 to develop a complete Unix-like operating system which is free software: the GNU system.  GNU is a recursive acronym for "GNU's Not Unix"; it is pronounced [https://www.gnu.org/gnu/pronunciation.en.html g'noo].


The [https://www.fsf.org/ Free Software Foundation (FSF)] is the principal organisation that has sponsored the GNU Project.
The [https://www.fsf.org/ Free Software Foundation (FSF)] is the principal organization that has sponsored the GNU Project.


Octave became GNU Octave in 1997 (beginning with [[Release History|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 [https://www.gnu.org/prep/standards/standards.html GNU coding standards] and to benefit from GNU's infrastructure (e.g. [https://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.
Octave became GNU Octave in 1997 (beginning with [[Release History|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 [https://www.gnu.org/prep/standards/standards.html GNU coding standards] and to benefit from GNU's infrastructure (e.g. [https://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.
Line 65: Line 65:
Run {{manual|citation}} at the Octave prompt for details on how to best cite the Octave version you are running.  Certain Octave packages also have recommended citations in which case use <code>citation package_name</code>.
Run {{manual|citation}} at the Octave prompt for details on how to best cite the Octave version you are running.  Certain Octave packages also have recommended citations in which case use <code>citation package_name</code>.


Note that there are two reasons for citing the software used.  One is giving recognition to the work done by others which we have already addressed to . The other is giving details on the system used so that experiments can be replicated.  For this, you should cite the version of Octave and all packages used (you can get this information using the <code>ver</code> command), as well as any details of your setup as part of your Methods.  In addition, you should make your source available as well . See [http://software.ac.uk/so-exactly-what-software-did-you-use How to cite and describe software] for more details and an in depth discussion for the same .
Note that there are two reasons for citing the software used.  One is giving recognition to the work done by others which we have already addressed to. The other is giving details on the system used so that experiments can be replicated.  For this, you should cite the version of Octave and all packages used (you can get this information using the <code>ver</code> command), as well as any details of your setup as part of your Methods.  In addition, you should make your source available as well. See [http://software.ac.uk/so-exactly-what-software-did-you-use How to cite and describe software] for more details and an in depth discussion for the same.


==What documentation exists for Octave?==
==What documentation exists for Octave?==
Line 124: Line 124:
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.
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.


In addition, some advanced operations are computed by approximation and there is no guarantee for them to be accurate, see [https://en.wikipedia.org/wiki/Rounding#Table-maker.27s_dilemma Table-maker's dilemma] for further references . Their results are system-dependent.
In addition, some advanced operations are computed by approximation and there is no guarantee for them to be accurate, see [https://en.wikipedia.org/wiki/Rounding#Table-maker.27s_dilemma Table-maker's dilemma] for further references. Their results are system-dependent.


This isn't a bug that is limited to GNU-Octave & it happens with any program that uses [https://en.wikipedia.org/wiki/IEEE_754 IEEE 754 floating-point arithmetic].  To be fair, IEEE 754 also specifies decimal floating-point arithmetic, which has never seen wide adoption.  The reason why Octave and other programs using IEEE 754 binary floating-point numbers is that they are ''fast'', because they are implemented in hardware or system libraries.  Unless you are using very exotic hardware, Octave will use your computer's processor for basic floating-point arithmetic.
This isn't a bug that is limited to GNU-Octave & it happens with any program that uses [https://en.wikipedia.org/wiki/IEEE_754 IEEE 754 floating-point arithmetic].  To be fair, IEEE 754 also specifies decimal floating-point arithmetic, which has never seen wide adoption.  The reason why Octave and other programs using IEEE 754 binary floating-point numbers is that they are ''fast'', because they are implemented in hardware or system libraries.  Unless you are using very exotic hardware, Octave will use your computer's processor for basic floating-point arithmetic.
Line 136: Line 136:
Some windows users with integrated Intel GPUs have reported missing lines when printing with an OpenGL toolkit like FLTK or Qt. {{bug|42534}}
Some windows users with integrated Intel GPUs have reported missing lines when printing with an OpenGL toolkit like FLTK or Qt. {{bug|42534}}


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 .
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.


See also https://www.opengl.org/wiki/FAQ#Why_is_my_GL_version_only_1.4_or_lower.3F .
See also https://www.opengl.org/wiki/FAQ#Why_is_my_GL_version_only_1.4_or_lower.3F .
Line 146: Line 146:
==Error message about invalid call to script or invalid use of script in index expression==
==Error message about invalid call to script or invalid use of script in index expression==


If Octave shows an error message about {{Codeline|invalid call to script .../close.m}} or {{Codeline|invalid use of of script .../close.m in index expression}}, it means that you have created a script called close.m that is overriding the built-in Octave function {{Codeline|close}}. Octave functions and scripts share the same global namespace. It is best to avoid creating your own scripts or functions that have the same name as an Octave function as to avoid this error regarding the invalid call to script or invalid use of script in index expression .
If Octave shows an error message about {{Codeline|invalid call to script .../close.m}} or {{Codeline|invalid use of of script .../close.m in index expression}}, it means that you have created a script called close.m that is overriding the built-in Octave function {{Codeline|close}}. Octave functions and scripts share the same global namespace. It is best to avoid creating your own scripts or functions that have the same name as an Octave function as to avoid this error regarding the invalid call to script or invalid use of script in index expression.


=Licensing issues=
=Licensing issues=
Line 185: Line 185:
==How can I install Octave on Windows?==
==How can I install Octave on Windows?==


:'' So as to install GNU-Octave for Windows O.S ,refer to : [[Octave for Microsoft Windows]]''
:'' So as to install GNU-Octave for Windows O.S, refer to : [[Octave for Microsoft Windows]]''


==How can I install Octave on MacOS?==
==How can I install Octave on MacOS?==


:''So as to install GNU-Octave for MacOS ,refer to : [[Octave for macOS]]''
:''So as to install GNU-Octave for MacOS, refer to : [[Octave for macOS]]''


==How can I install Octave on GNU/Linux?==
==How can I install Octave on GNU/Linux?==


:'' So as to install GNU-Octave on GNU/Linux ,refer to: [[Octave for GNU/Linux]]''
:'' So as to install GNU-Octave on GNU/Linux, refer to: [[Octave for GNU/Linux]]''


==How to install Octave on Android OR What is the Octave app available in the Google Play store?==
==How to install Octave on Android OR What is the Octave app available in the Google Play store?==
Line 455: Line 455:
==How do I increase Octave's precision?==
==How do I increase Octave's precision?==


Octave's default numerical type is [https://en.wikipedia.org/wiki/IEEE_754 IEEE 754] binary64 , a.k.a. "double" or "hardware floats".  This type has a precision of 53 bits or about 16 decimal digits. It is supported by each modern computer hardware, so it is really '''fast'''.  This type is assumed throughout for Octave's calculations.  If more precision was required, one can obtain a "few bits more" by using integer types, e.g. {{manual|uint64}}, but in general one cannot expect more precision from any '''fast''' numerical software.  Just to visualize "how big" those numerical limits are, consider the following table:
Octave's default numerical type is [https://en.wikipedia.org/wiki/IEEE_754 IEEE 754] binary64, a.k.a. "double" or "hardware floats".  This type has a precision of 53 bits or about 16 decimal digits. It is supported by each modern computer hardware, so it is really '''fast'''.  This type is assumed throughout for Octave's calculations.  If more precision was required, one can obtain a "few bits more" by using integer types, e.g. {{manual|uint64}}, but in general one cannot expect more precision from any '''fast''' numerical software.  Just to visualize "how big" those numerical limits are, consider the following table:


{| class="wikitable"
{| class="wikitable"
Line 606: Line 606:
==Simulink==
==Simulink==


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.
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.


==MEX-Files==
==MEX-Files==

Navigation menu