Matrix a is given as follows. Write a program calculate Matrix b as transpose of matrix a and matrix n as multiplication of matrices a and b. 2 4 1 5 a.

Slides:



Advertisements
Similar presentations
Learning Objectives To apply the summation and product notation To define a matrix To solve problems on matrix summation, subtraction and multiplication.
Advertisements

Identity and Inverse Matrices
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Introduction to Matlab
Matrices A matrix is a rectangular array of quantities (numbers, expressions or function), arranged in m rows and n columns x 3y.
Engineering Problem Solving with C++ An Object Based Approach Chapter 7 Two-Dimensional Arrays and Matrices.
Maths for Computer Graphics
Soft Computing 1 Matlab Tutorial Kai Goebel, Bill Cheetham RPI/GE CRD
Lecture # 9 Matrix Representation of Symmetry Groups
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
Digital to Analog (D/A) Converter Discussion D2.2.
1 Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as a i,j and elements of.
LAB-12 2-D Array I Putu Danu Raharja Information & Computer Science Department CCSE - King Fahd University of Petroleum & Minerals.
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Matlab Basics Introduction to Matlab: Matrix Operations.
Matrix Definition A Matrix is an ordered set of numbers, variables or parameters. An example of a matrix can be represented by: The matrix is an ordered.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
4.3 The Inverse of a Matrix Warm-up (IN)
Section 10.3 – The Inverse of a Matrix No Calculator.
4.2 Adding and Subtracting Matrices 4.3 Matrix Multiplication
Using Matrices to Solve a System of Equations. Multiplicative Identity Matrix The product of a square matrix A and its identity matrix I, on the left.
Chapter 2 Solving Linear Systems Matrix Definitions –Matrix--- Rectangular array/ block of numbers. –The size/order/dimension of a matrix: (The numbers.
Chapter 4 Section 4: Inverse and Identity Matrices 1.
Identity & Inverse Matrices
Class Opener:. Identifying Matrices Student Check:
Matrices Matrices A matrix (say MAY-trix) is a rectan- gular array of objects (usually numbers). An m  n (“m by n”) matrix has exactly m horizontal.
Robot Kinematics: Position Analysis 2.1 INTRODUCTION  Forward Kinematics: to determine where the robot ’ s hand is? (If all joint variables are known)
ITI 1120 Lab #9 Slides by: Diana Inkpen and Alan Williams.
The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data.
An introduction to arrays. Introduction In scientific and engineering computing, it is very common to need to manipulate ordered sets of values, such.
Matrices: Simplifying Algebraic Expressions Combining Like Terms & Distributive Property.
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
 6. Use matrices to represent and manipulate data, e.g., to represent payoffs or incidence relationships related in a network.  7. Multiply matrices.
MT411 Robotic Engineering Asian Institution of Technology (AIT) Chapter 1 Introduction to Matrix Narong Aphiratsakun, D.Eng.
MATRICES Operations with Matrices Properties of Matrix Operations
Two-Dimensional Arrays and Matrices ELEC 206 Computer Applications for Electrical Engineers.
CS 450: COMPUTER GRAPHICS TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Table of Contents Matrices - Definition and Notation A matrix is a rectangular array of numbers. Consider the following matrix: Matrix B has 3 rows and.
3.5 Perform Basic Matrix Operations Add Matrices Subtract Matrices Solve Matric equations for x and y.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Using Matrices to Solve a 3-Variable System
Haas MFE SAS Workshop Lecture 3:
13.4 Product of Two Matrices
MATRICES.
LINEAR ALGEBRA.
Introduction to Programming
1.5 Matricies.
Multiplication table. x
Computer Graphics Matrix
Section 3.3 – The Inverse of a Matrix
Multidimensional array
5 × 7 = × 7 = 70 9 × 7 = CONNECTIONS IN 7 × TABLE
5 × 8 = 40 4 × 8 = 32 9 × 8 = CONNECTIONS IN 8 × TABLE
4 × 6 = 24 8 × 6 = 48 7 × 6 = CONNECTIONS IN 6 × TABLE
5 × 6 = 30 2 × 6 = 12 7 × 6 = CONNECTIONS IN 6 × TABLE
Lets Play with arrays Singh Tripty
10 × 8 = 80 5 × 8 = 40 6 × 8 = CONNECTIONS IN 8 × TABLE MULTIPLICATION.
3 × 12 = 36 6 × 12 = 72 7 × 12 = CONNECTIONS IN 12 × TABLE
A square matrix is a matrix with the same number of columns as rows.
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
Calculate 81 ÷ 3 = 27 3 x 3 x 3 3 x 3 x 3 x 3 ÷ 3 = This could be written as
5 × 12 = × 12 = × 12 = CONNECTIONS IN 12 × TABLE MULTIPLICATION.
5 × 9 = 45 6 × 9 = 54 7 × 9 = CONNECTIONS IN 9 × TABLE
Applied Discrete Mathematics Week 4: Functions
L4-5/L4-6 Objective: Students will be able to evaluate determinants of matrices.
Presentation transcript:

Matrix a is given as follows. Write a program calculate Matrix b as transpose of matrix a and matrix n as multiplication of matrices a and b a =

program mat_cal integer,dimension(2,2)::a,b,n integer::i a(1,1)=2 a(1,2)=4 a(2,1)=1 a(2,2)=5 b=transpose (a) n=matmul(a,b) print*,"Martix_a=",a,"Matrix_b=",b,"Matrix_n=",n do i=1,2 print "(3(2i3,a))",a(i,1:2)," ",b(i,1:2)," ",n(i,1:2)," " end do endprogram mat_cal

Matrix a and b are given as follows. Write a program calculate and print Matrix a, b, c and d. (Write same program using reshape function also) a= b= e=transpose(a) c=matmul(e,b) d=a+c

program mat1 integer,dimension(3,3)::a,b,c,d,e integer::i,j a(1,1)=-1 a(1,2)=2 a(1,3)=2 a(2,1)=4 a(2,2)=3 a(2,3)=1 a(1,3)=2 a(3,1)=1 a(3,2)=1 a(3,3)=1 do i=1,3 do j=1,3 b(i,j)=1 e=transpose(a) c=matmul(e,b) d=a+c end do print*,"a=",a," b=",b," c=",c," d=",d end program mat1 print*," " do i=1,3 print "(4(3i3,a))",a(i,1:3)," ",b(i,1:3)," ",c(i,1:3)," ",d(i,1:3) end do

program mat2 integer,dimension(3,3)::a,b,c,d,e integer::i,j a=reshape((/-1,4,1,2,3,1,2,1,1/),(/3,3/)) do i=1,3 do j=1,3 b(i,j)=1 e=transpose(a) c=matmul(e,b) d=a+c end do print*," " do i=1,3 print "(4(3i3,a))",a(i,1:3)," ",b(i,1:3)," ",c(i,1:3)," ",d(i,1:3) end do end program mat2

Write down a program that calculates and print the elements of given matrix using do loop.

program mat3 integer,dimension(5,5)::a integer::i,j do i=1,5 do j=1,5 if (i==j) then a(i,j)=i**2 else a(i,j)=(i+j)-1 end if end do do i=1,5 print"(3(5i4))",a(i,1:5) end do end program mat3

program home10 integer,dimension(5,5)::A,B,C,D integer::i,j A=reshape((/1,2,3,4,5,2,4,4,5,6,3,4,9,6,7,4,5,6,16,8,5,6,7,8,25/), (/5,5/)) do i=1,5 do j=1,5 if (i==j)then B(i,j)=7 else B(i,j)=0 end if end do

C=A+B D=5*A-3*B print*," Matrix A"," ","Matrix B" do i=1,5 print"(2(5i4,a))",A(i,1:5)," ",B(i,1:5) end do print*," " print*," Matrix C"," ","Matrix D" do i=1,5 print"(2(5i4,a))",C(i,1:5)," ",D(i,1:5) end do end program home10

Write down a program that writes the results of the multiplication table as following.

program multi_square ! !This program shows the multipication square. ! !variable declerations integer::i,j integer,dimension(12)::x print*," " print*," x" !make the calculations do i=1,12 do j=1,12 x(j)=i*j end do !print the outputs print "(i6,12i4)",i,x(1:12) end do end program multi_square

program mat2 integer,dimension(3,3)::a,b,c,d,e integer::i,j a=reshape((/-1,4,1,2,3,1,2,1,1/),(/3,3/)) do i=1,3 do j=1,3 b(i,j)=1 e=transpose(a) c=matmul(e,b) d=a+c end do print*," " do i=1,3 print "(4(3i3,a))",a(i,1:3)," ",b(i,1:3)," ",c(i,1:3)," ",d(i,1:3) end do end program mat2