Added flexibility – C style input and output functions
The function disp
is easy to use. However, it has limitations. For example, we can display only a single variable with disp
and it always prints a newline character after displaying the variable value
Octave has implemented most of the very flexible input and output functionality that you may know from C. If not, do not worry, we will go through the most important one here, namely the printf
function. Functions that can write and read to and from files, such as fprintf
, fgets
, and fscanf
, are also supported in Octave: if you want to know more about these functions, I strongly recommend you to look in the Octave manual.
printf
printf
is an acronym for print formatted text. The general syntax ...
Get GNU Octave now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.