C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
Bartleby Related Questions Icon

Related questions

Question
[画像:For this week's laboratory, you will write four linear algebra functions using for-loops or while-loops. The four linear algebra functions you will write are 1) calculating the magnitude of a vector, 2) a vector dot product, 3) matrix- vector multiply (Ax-bi, and 4) matrix-matrix multiply (AB=C). You will write your programs in Jupyter Notebook. You will define the input vectors and matrices in the main, pass into your functions, and pass out the results (i.e. magnitude of a vector, the result from the dot product, the result from the matrix-vector multiply, which is the vector b, and the result from the matrix-matrix multiply, which is the matrix C). You cannot use any built-in mathematical functions; you must write these on your own. Below are the vectors and the matrix you will use 8 1 -4 15 2 7 5 17 6 3 2 30 1 8 21 12 20 9 27 1 x1= and x2= A= and B= 10 11 10 6 11 14 11 2 23 24 17 6 17 9 4 23 8 24 2 27]
expand button
Transcribed Image Text:For this week's laboratory, you will write four linear algebra functions using for-loops or while-loops. The four linear algebra functions you will write are 1) calculating the magnitude of a vector, 2) a vector dot product, 3) matrix- vector multiply (Ax-bi, and 4) matrix-matrix multiply (AB=C). You will write your programs in Jupyter Notebook. You will define the input vectors and matrices in the main, pass into your functions, and pass out the results (i.e. magnitude of a vector, the result from the dot product, the result from the matrix-vector multiply, which is the vector b, and the result from the matrix-matrix multiply, which is the matrix C). You cannot use any built-in mathematical functions; you must write these on your own. Below are the vectors and the matrix you will use 8 1 -4 15 2 7 5 17 6 3 2 30 1 8 21 12 20 9 27 1 x1= and x2= A= and B= 10 11 10 6 11 14 11 2 23 24 17 6 17 9 4 23 8 24 2 27
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,