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
224 Introduction to Computational Modeling
element 3 = 5.25
element 4 = 5.25
element 5 = 0.25
element 6 = 0.25
element 7 = 0.25
17.5 Simple Vector Operations
Operations on vectors are performed with a vector and a scalar or with two vec-
tors. These are performed by calling GSL functions in C.
17.5.1 Arithmetic Operations
To add a scalar to a vector involves adding the scalar value to every element of
the vector. With C and GSL, calling function gsl vector add constant. This function
adds the specified constant value to the elements of the vector specified.
In the following portion of code, vector pv is created and then its elements are
assigned values. On ...
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