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
250 Introduction to Computational Modeling
18.3.3 GSL Matrix Views
To use a submatrix of a matrix, the GSL provides matrix views. These are of
type gsl matrix view and the elements of the views can be accessed with the address
of component matrix of the view (using the & operator). In the following example,
matrix a is created with 7 rows and 5 columns. Then a matrix view suba of matrix a
is created to get a submatrix of a. The upper left element of the submatrix is on row
2 and column 2 of matrix a. The submatrix, suba, has 4 rows and 3 columns. The
third statement illustrates how to use a matrix view to add 12.4 to the elements of the
submatrix suba ...
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