Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENGR-25_Arrays-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.

Similar presentations


Presentation on theme: "ENGR-25_Arrays-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical."— Presentation transcript:

1 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Engr/Math/Physics 25 Chp2 MATLAB Arrays: Part-1

2 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 2 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Learning Goals  Learn to Construct 1-Dimensional Row and Column Vectors  Create MULTI-Dimensional ARRAYS and MATRICES  Perform Arithmetic Operations on Vectors and Arrays/Matrices  Analyze Polynomial Functions

3 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 3 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Position Vector  The vector p can be specified by three components: x, y, and z, and can be written as: Where i, j, k are  UNIT-Vectors Which are || To The CoOrd Axes  MATLAB can accommodate Vectors having more than 3 Elements See MATH6 for more info on “n-Space”

4 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 4 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ROW & COLUMN Vectors  To create a ROW vector, separate the elements by COMMAS  Use the Transpose operator (‘) to make a COLUMN Vector  Create Col-Vector Directly with SEMICOLONS >>p = [3,7,9] p = 3 7 9  The TRANSPOSE Operation Swaps Rows↔Columns >>p = [3,7,9]' p = 3 7 9 >>g = [3;7;9] g = 3 7 9

5 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 5 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods “Appending” Vectors  Can create a NEW vector by ''appending'' one vector to another  e.g.; to create the row vector u whose first three columns contain the values of r = [2,4,20] and whose 4 th, 5 th, & 6 th columns contain the values of w = [9,-6,3] Typing u = [r,w] yields vector u = [2,4,20,9,-6,3] >> r = [2,4,20]; w = [9,-6,3]; >> u = [r,w] u = 2 4 20 9 -6 3

6 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 6 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Colon (:) Operator  The colon operator (:) easily generates a large vector of regularly spaced elements.  Typing >>x = [m:q:n] creates a vector x of values with a spacing q. The first value is m. The last value is n IF m - n is an integer multiple of q. IF NOT, the last value is LESS than n. >> p = [0:2:8] p = 0 2 4 6 8 >> r = [0:2:7] r = 0 2 4 6

7 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 7 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Colon (:) Operator cont.  To create a row vector z consisting of the values from 5 to 8 in steps of 0.1, type z = [5:0.1:8].  If the increment q is OMITTED, it is taken as the DEFAULT Value of +1. >> s =[-11:-6] s = -11 -10 -9 -8 -7 -6 >> t = [-11:1:-6] t = -11 -10 -9 -8 -7 -6

8 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 8 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods linspace Comand  The linspace command also creates a linearly spaced row vector, but instead you specify the number of values rather than the increment  The syntax is linspace(x1,x2,n), where x1 and x2 are the lower and upper limits and n is the number of points If n is omitted, then it Defaults to 100  Thus EQUIVALENT statements >> linspace(5,8,31) = >> [5:0.1:8]

9 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 9 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods logspace Comand  The logspace command creates an array of logarithmically spaced elements  Its syntax is logspace(a,b,n), where n is the number of points between 10 a and 10 b  For example, x = logspace(-1,1,4) produces the vector x = [0.1000, 0.4642, 2.1544, 10.000] >> x = logspace(-1,1,4); >> y = log10(x) y = -1.0000 -0.3333 0.3333 1.0000  If n is omitted, the no. of pts defaults to 50

10 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 10 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods logspace Example  Consider this command >> y =logspace(-1,2,6) y = 0.1000 0.3981 1.5849 6.3096 25.1189 100.0000  Calculate the Power of 10 increment  In this case  In this Case kPowerykyk 10.1000 2-0.40.3981 30.21.5849 40.86.3096 51.425.1189 62100.0000  for k = 1→6, then the k th y-value

11 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 11 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods logspace Example (alternative)  Consider this command >> y =logspace(-1,2,6) y = 0.1000 0.3981 1.5849 6.3096 25.1189 100.0000  Take base-10 log of the above  Calc Spacing Between Adjacent Elements with diff command >> yLog10 = log10(y) yLog10 = -1.0000 -0.4000 0.2000 0.8000 1.4000 2.0000 >> yspc = diff(yLog10) yspc = 0.6000 0.6000 0.6000 0.6000 0.6000

12 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 12 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vector: Magnitude, Length, and Absolute Value  Keep in mind the precise meaning of these terms when using MATLAB The length command gives the number of elements in the vector The magnitude of a vector x having elements x 1, x 2, …, x n is a scalar, given by √(x 1 2 + x 2 2 + … + x n 2 ), and is the same as the vector's geometric length The absolute value of a vector x is, in MATLAB, a vector whose elements are the arithmetic absolute values of the elements of x

13 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 13 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Mag, Length, and Abs-Val  Geometric Length  By Pythagoras Find vector a magnitude  Thus the box diagonal >> a =[2,-4,5]; >> length(a) ans = 3 >> % the Magnitude M = norm(a) >> Mag_a = norm(a) Mag_a = 6.7082 >> abs(a) ans = 2 4 5

14 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 14 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 3D Vector Length Example % Bruce Mayer * ENGR36 % 25Aug09 * Lec03 % file = VectorLength_0908.m % NOTE: using “norm” command is much easier % % Find the length of a Vector AB with % tail CoOrds = (0, 0, 0) % tip CoOrds = (2, 1, -5) % % Do Pythagorus in steps vAB = [2 1 -5] % define vector sqs = vAB.*vAB % sq each CoOrd sum_sqs = sum(sqs) % Add all sqs LAB = sqrt(sum_sqs) % Take SQRT of the sum- of-sqs

15 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 15 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 3D Vector Length Example - Run vAB = 2 1 -5 sqs = 4 1 25 sum_sqs = 30 LAB = 5.4772 % Bruce Mayer * ENGR36 % 25Aug09 * Lec03 % file = VectorLength_0908.m % % Find the length of a Vector AB with % tail CoOrds = (0, 0, 0) % tip CoOrds = (2, 1, -5) % % Do Pythagorus in steps vAB = [2 1 -5] % define vector sqs = vAB.*vAB % sq each CoOrd sum_sqs = sum(sqs) % Add all sqs LAB = sqrt(sum_sqs) % Take SQRT of the sum-of-sqs

16 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 16 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrices/Arrays  A MATRIX has multiple ROWS and COLUMNS. For example, the matrix M:  VECTORS are SPECIAL CASES of matrices having ONE ROW or ONE COLUMN.  M contains FOUR rows THREE columns

17 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 17 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Making Matrices  For a small matrix you can type it row by row, separating the elements in a given row with spaces or commas and separating the rows with semicolons. For example, typing  spaces or commas separate elements in different columns, whereas semicolons separate elements in different rows.  The Command >>A = [2,4,10;16,3,7];  Generates Matrix

18 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 18 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Making Matrices from Vectors  Given Row Vectors: r = [1,3,5] and s = [7,9,11]  Combine these vectors to form vector-t and Matrix-D >> r = [1,3,5]; s = [7,9,11]; >> t = [r s] t = 1 3 5 7 9 11 >> D = [r;s] D = 1 3 5 7 9 11  Note the difference between the results given by [r s] (or [r,s] ) and [r;s]

19 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 19 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Directly Make Matrix  Use COMMAS/SPACES combined with SEMICOLONS to Construct Matrices >> D = [[1,3,5]; [7 9 11]] D = 1 3 5 7 9 11  Note the use of BOTH Commas and Spaces as COLUMN-Separators The SEMICOLON as the ROW-Separator

20 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 20 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Make Matrix Example >> r1 = [1:5] r1 = 1 2 3 4 5 >> r2 = [6:10] r2 = 6 7 8 9 10 >> r3 = [11:15] r3 = 11 12 13 14 15 >> r4 = [16:20] r4 = 16 17 18 19 20 >> r5 = [21:25] r5 = 21 22 23 24 25 >> A = [r1;r2;r3;r4;r5] A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

21 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 21 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Array Addressing  The COLON operator SELECTS individual elements, rows, columns, or ''subarrays'' of arrays. Some examples: v(:) represents all the row or column elements of the vector v v(2:5) represents the 2 nd thru 5 th elements; that is v(2), v(3), v(4), v(5). A(:,3) denotes all the row-elements in the third column of the matrix A. A(:,2:5) denotes all the row-elements in the 2 nd thru 5 th columns of A. A(2:3,1:3) denotes all elements in the 2 nd & 3 rd rows that are also in the 1 st thru 3 rd columns.

22 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 22 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Array Extraction  You can use array indices to extract a smaller array from another array. For example, if you first create the array B  to Produce SubMatrix C type C = B(2:3,1:3) Rows 2&3 Cols 1-3

23 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 23 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Array Extraction Example A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 >> C = A(3:5,2:5) C = 12 13 14 15 17 18 19 20 22 23 24 25

24 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 24 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Commands CommandDescription [u,v,w] = find(A) Computes the arrays u and v, containing the row and column indices of the NONzero elements of the matrix A, and the array w, containing the values of the nonzero elements. The array w may be omitted. length(A) Computes either the number of elements of A if A is a vector or the largest value of m or n if A is an m × n matrix. size(A) Returns a row vector [m n] containing the sizes of the m x n array A.

25 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 25 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Commands cont CommandDescription max(A) * Returns the algebraically largest element in A if A is a VECTOR. * Returns a row vector containing the largest elements in each Column if A is a MATRIX. * If any of the elements are COMPLEX, max(A) returns the elements that have the largest magnitudes. [x,k] = max(A) Similar to max(A) but stores the maximum values in the row vector x and their indices in the row vector k.

26 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 26 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Commands cont CommandDescription min(A) and [x,k] = min(A) Like max but returns minimum values. sort(A) Sorts each column of the array A in ascending order and returns an array the same size as A. sum(A) Sums the elements in each column of the array A and returns a row vector containing the sums.

27 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 27 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Examples: Matrix Commands  Given Matrix A >> A = [[6,2]; [-10,5]; [3,7]]; >> size(A) ans = 3 2 >> length(A) ans = 3 >> max(A) ans = 6 7 >> min(A) ans = -10 2

28 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 28 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods WorkSpace Browser  Allows DIRECT access to Variables for editing & changing

29 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 29 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Array Editor  Permits changing of a single Array Value without retyping the entire specification

30 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 30 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods MultiDimensional (  3) Arrays  3D (or more-D) Arrays Consist of two- dimensional arrays that ar “layered” to produce a third dimension. Each “layer” is called a page. 3D pg1pg2pg3pg4 CommandDescription cat(n,A,B,C,...) Creates a new array by concatenating the arrays A,B,C, and so on along the dimension n.

31 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 31 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vectors Digression  VECTOR  Parameter Possessing Magnitude And Direction, Which Add According To The Parallelogram Law Examples: Displacements, Velocities, Accelerations  SCALAR  Parameter Possessing Magnitude But Not Direction Examples: Mass, Volume, Temperature  Vector Classifications FIXED or BOUND Vectors Have Well Defined Points Of Application That CanNOT Be Changed Without Affecting An Analysis

32 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 32 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vectors cont. FREE Vectors May Be Moved In Space Without Changing Their Effect On An Analysis SLIDING Vectors May Be Applied Anywhere Along Their Line Of Action Without Affecting the Analysis EQUAL Vectors Have The Same Magnitude and Direction NEGATIVE Vector Of a Given Vector Has The Same Magnitude but The Opposite Direction Equal Vectors Negative Vectors

33 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 33 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vector Addition  Parallelogram Rule For Vector Addition  Examine Top & Bottom of The Parallelogram Triangle Rule For Vector Addition B B C C Vector Addition is Commutative Vector Subtraction → Reverse Direction of The Subtrahend

34 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 34 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vector Addition cont.  Addition Of Three Or More Vectors Through Repeated Application Of The Triangle Rule  The Polygon Rule For The Addition Of Three Or More Vectors Vector Addition Is Associative  Multiplication by a Scalar Scales the Vector LENGTH

35 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 35 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vector Notation  In Print and Handwriting We Must Distinguish Between VECTORS SCALARS  These are Equivalent Vector Notations Boldface Preferred for Math Processors Over Arrow/Bar Used for Handwriting Underline Preferred for Word Processor

36 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 36 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Dot Product of 2 Vectors  The SCALAR PRODUCT or DOT PRODUCT Between Two Vectors P and Q Is Defined As  Scalar-Product Math Properties ARE Commutative ARE Distributive Are NOT Associative –Undefined as (PS) is NO LONGER a Vector

37 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 37 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Scalar Product – Cartesian Comps  Scalar Products With Cartesian Components  MATLAB Makes this Easy with the dot(p,q) Command >> p = [13,-17,-7]; q = [-16,5,23]; >> pq = dot(p,q) pq = -454 >> qp = dot(q,p) qp = -454 >> r = [1 3 5 7]; t = [8,6,4,2]; >> rt = dot(r,t) rt = 60

38 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 38 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Cross Product  TWISTING Power of a Force  MOMENTof the Force Quantify Using VECTOR PRODUCT or CROSS PRODUCT  Vector Product Of Two Vectors P and Q Is Defined as The Vector V Which Satisfies: Line of Action of V Is Perpendicular To the Plane Containing P and Q. |V| =|P||Q|sinθ Rt Hand Rule Determines Line of Action for V

39 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 39 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vector Product Math Properties  Recall Vector ADDITION Behaved As Algebraic Addition –BOTH Commutative and Associative.  The Vector PRODUCT Math-Properties do NOT Match Algebra. Vector Products Are NOT Commutative Are NOT Associative ARE Distributive

40 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 40 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Vector Prod: Rectangular Comps  Vector Products Of Cartesian Unit Vectors  Vector Products In Terms Of Rectangular Coordinates Summarize Using Determinate Notation

41 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 41 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods cross command  3D Vector (Cross) product Evaluation is Painful c.f. last Slide  MATLAB makes it easy with the cross(p,q) command The two Vectors MUST be 3 Dimensional >> p = [13,-17,-7]; >> q = [-16,5,23]; >> pxq = cross(p,q) pxq = -356 -187 -207 >> qxp = cross(q,p) qxp = 356 187 207

42 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 42 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Array Addition and Subtraction  Add/Subtract Element-by-Element >> A = [6,-2;10,3]; >> B = [9,8;-12,14]; >> A+B ans = 15 6 -2 17 >> p = [17 -9 3]; >> q = [-11,-4,19]; >> p-q ans = 28 -5 -16  Using MATLAB

43 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 43 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Example 2.3-2 55’ 36’ z = Down y = Nx = W 25’ r -20’ 59’ 20’ w −r−r v = w − r

44 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 44 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Example 2.3-2 cont z = Down y = N x = W r w -r v = w-r >> r = [55,36,25]; w = [-20,59,15]; >> b = r.*r b = 3025 1296 625 >> c = sum(b) c = 4946 >> dist1 = sqrt(c) dist1 = 70.3278 >> v = w-r v = -75 23 -10 >> dist2 = sqrt(sum(v.*v)) dist2 = 79.0822

45 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 45 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods CAVEAT  2D arrays are described as ROWS x COLUMNS Elemement of D(2,5) –2 → ROW-2 –5 → COL-5  ROW Vector → COMMAS  COL Vector → SemiColons >> r = [4,73,17] r = 4 73 17 >> c = [13;37;99] c = 13 37 99

46 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 46 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Caveat cont  Array operations often CONCATENATE or APPEND This Can Occur unexpectedly Use the clear command to start from scratch concatenate con·cat·e·nate ( P ) Pronunciation Key (kn-ktn-t, kn-) tr.v. con·cat·e·nat·ed, con·cat·e·nat·ing, con·cat·e·nates 1.To connect or link in a series or chain. 2.Computer Science. To arrange (strings of characters) into a chained list. adj. (-nt, -nt) 1.Connected or linked in a series.

47 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 47 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods All Done for Today  Matrix Multiplication Explained in Fine Detail in MATH6 Some UseFul Links Next Time: More Array Operations –http://www.mai.liu.se/~halun/mat rix/matrix.html –http://people.hofstra.edu/faculty/ Stefan_Waner/RealWorld/tutoria lsf1/frames3_2.html –http://calc101.com/webMathema tica/matrix-algebra.jspMatrix Multiplication

48 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 48 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Engr/Math/Physics 25 Appendix-1 Vector Math

49 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 49 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Rectangular Force Components  Using Rt-Angle Parallelogram Resolve F into Perpendicular Components  Define Perpendicular UNIT Vectors Which Are Parallel To The Axes  Vectors May then Be Expressed As Products Of The Unit Vectors With The SCALAR MAGNITUDES Of The Vector Components

50 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 50 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Adding by  Components  Find: Resultant of 3+ Forces  Plan: Resolve Each Force Into Components Add LIKE Components To Determine Resultant Use Trig to Fully Describe Resultant

51 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 51 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Adding by Comp.  cont.  The Scalar Components Of The Resultant Are Equal To The Sum Of The Corresponding Scalar Components Of The Given Forces  Use The Scalar Components Of The Resultant to Find the Resultant Magnitude & Direction By Trig

52 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 52 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 3D Rectangular Components  Resolve F h into rectangular components  Resolve F into horizontal and vertical components.  The vector F is contained in the plane OBAC.

53 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 53 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 3D Rectangular Comp. cont.  With the angles between F and the axes  is a UNIT VECTOR along the line of action of F, and cos  x, cos  y, and cos  z, are the DIRECTION COSINES for F

54 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 54 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods 2-Pt Direction Cosines  Consider Force, F, Directed Between Pts M(x 1,y 1,z 1 ) N(x 2,y 2,z 2 )  The Vector MN Joins These Points with Scalar Components d x, d y, d z

55 BMayer@ChabotCollege.edu ENGR-25_Arrays-1.ppt 55 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Engr/Math/Physics 25 Appendix Live Demo


Download ppt "ENGR-25_Arrays-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical."

Similar presentations


Ads by Google