Skip to Main Content
Introduction to Computational Modeling Using C and Open-Source Tools
book

Introduction to Computational Modeling Using C and Open-Source Tools

by Jose M. Garrido
November 2013
Intermediate to advanced content levelIntermediate to advanced
461 pages
12h 1m
English
CRC Press
Content preview from Introduction to Computational Modeling Using C and Open-Source Tools
240 Introduction to Computational Modeling
18.2.3 Matrix Manipulation in C and the GSL
Matrices are created and manipulated in C by calling the various library function
in the GSL. Before using a matrix, it needs to be created. Function gsl matrix alloc
creates a matrix of the specified length m rows and n columns, and returns a pointer
to the matrix. Matrices are stored in row-major order, the elements of each row form
a contiguous block in memory. This is the standard C-language ordering of two-
dimensional arrays.
When a matrix is no longer needed in the program, it can be destroyed by call-
ing the GSL function gsl matrix free. The first of the following ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Fundamentals and Programming in C (RMK)

Computer Fundamentals and Programming in C (RMK)

Anita Goel, Ajay Mittal

Publisher Resources

ISBN: 9781482216783