Editing
Library Reference
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Matlab API= Data types are indicated in ''italics''. In the '''Wrapper for''' column, procedure names with no other description belong to the C library. The '''G?''' heading means: "Demo-ed in the [[Guide_to_madagascar_API#MATLAB_interface|Guide to the Matlab API]]?" {|class="wikitable" align="center" cellspacing="0" border="1" |- | '''Name''' || '''Arguments''' || '''What it does''' || '''Wrapper for''' || '''G?''' |- | <tt>rsf_create</tt> || Arg 1: ''string (row vector)'' <tt>new_file_name</tt>;<br /> Arg 2: ''string (row vector)'' <tt>old_file_name</tt>, or ''double (column vector)'' '''in''' <tt>new_file_cube_dims</tt> || Writes to disk RSF header of native_float hypercube of desired dimensions. Takes as input the name of the new file and either the name of another file with a cube of the same size, or a column with cube dimensions || <tt>sf_fileflush</tt>, or <tt>sf_putint</tt> and <tt>sf_setformat</tt> || Y |- | <tt>rsf_dim</tt> || Arg1: ''string (row vector)'' <tt>filename</tt> || Returns a 9-element vector [n1, n2, ... n9] with the dimensions of the hypercube as described in the RSF header '''filename'''. Missing dimensions are given the value 1 || <tt>sf_filedims</tt> || Y |- | <tt>rsf_par</tt> || Arg 1: ''string (row vector)'' <tt>filename</tt>;<br /> Arg 2: ''string (row vector)'' <tt>par_name</tt>;<br /> Arg 3: ''string (row vector)'' <tt>par_type</tt>: i[nt], l[ogical], f[loat];<br /> Arg 4: ''double (scalar)'' <tt>default_val</tt> || Returns a scalar parameter read from a RSF header || <tt>sf_histint</tt>, <tt>sf_histbool</tt>, <tt>sf_histfloat</tt> || N |- | <tt>rsf_read</tt> || Arg 1: ''double'' <tt>data_array</tt>;<br /> Arg 2: ''string (row vector)'' <tt>filename</tt>;<br /> Arg 3 (optional): ''string (row vector)'' <tt>same</tt>. If Arg 3 is given, value should be "same" || Reads <tt>data_array</tt> from <tt>filename</tt>. Input data should be of SF_FLOAT, SF_INT or SF_COMPLEX type. The <tt>same</tt> parameter is a way to indicate if the data is read from the same file as before or from a newly opened file. If <tt>same</tt> is not given, the data will be read from the beginning of the file. || <tt>sf_floatread</tt>, <tt>sf_intread</tt>, <tt>sf_complexread</tt> || Y |- | <tt>rsf_write</tt> || Arg 1: ''double'' <tt>data_array</tt>;<br /> Arg 2: ''string (row vector)'' <tt>filename</tt>;<br /> Arg 3 (optional): ''string (row vector)'' <tt>same</tt>. If Arg 3 is given, value should be "same" || Writes <tt>data_array</tt> to <tt>filename</tt>. Data to be written can be integer, float, double or complex. It will get cast to RSF's native_float or native_complex encoding. || <tt>sf_floatwrite</tt>, <tt>sf_complexwrite</tt> || Y |}
Summary:
Please note that all contributions to Madagascar are considered to be released under the GNU Free Documentation License 1.3 or later (see
My wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Getting Madagascar
download
Installation
GitHub repository
SEGTeX
Introduction
Package overview
Tutorial
Hands-on tour
Reproducible documents
Hall of Fame
User Documentation
List of programs
Common programs
Popular programs
The RSF file format
Reproducibility with SCons
Developer documentation
Adding programs
Contributing programs
API demo: clipping data
API demo: explicit finite differences
Community
Conferences
User mailing list
Developer mailing list
GitHub organization
LinkedIn group
Development blog
Twitter
Slack
Tools
What links here
Related changes
Special pages
Page information