Octave

From Alliance Doc
Revision as of 17:02, 17 August 2022 by Stuekero (talk | contribs) (Created page with "Category:Software {{ draft }} [https://octave.org/ GNU Octave] is a scientific programming language that has a Powerful mathematics-oriented syntax with built-in 2D/3D pl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This article is a draft

This is not a complete article: This is a draft, a work in progress that is intended to be published into an article, which may or may not be ready for inclusion in the main wiki. It should not necessarily be considered factual or authoritative.




GNU Octave is a scientific programming language that has a Powerful mathematics-oriented syntax with built-in 2D/3D plotting and visualization tools. It is free and open-source software (FOSS) and is Drop-in compatible with many MATLAB scripts.

Running Octave code

File : octave_2d_plot.m

x = -10:0.1:10;
y = sin (x);
plot (x, y);
title ("Simple 2-D Plot");
xlabel ("x");
ylabel ("sin (x)");

print -dpng octave_2d_plot.png
quit



File : octave_job_1.sh

#!/bin/bash -l
#SBATCH --time=0-00:10
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4000M
module load octave/5.2.0 gnuplot/5.4.2

octave --no-gui octave_2d_plot.m