Question
using matlab
Create the following matrix B. [18 17 16 15 14 13] 12 11 10 9 8 7 6 5 4 3 2 1 Use the matrix B to: (a) Create a six-element c
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Screenshot

%Create a matrix B B-(18 17 16 15 14 13;12 11 10 9 8 7;6 5 4 3 2 1] %Create a column vector with 2nd and 5th column va-[B(:,2Program

%Create a matrix B
B=[18 17 16 15 14 13;12 11 10 9 8 7;6 5 4 3 2 1]
%Create a column vector with 2nd and 5th column
va=[B(:,2).' B(:,5).']
%Create a column vector 2nd column and 3rd rows 3-6 values
vb=[B(3,3:6) B(:,2).']
%Create a column vector of 2,4 and 6th of columns of B
vc=[B(:,2).' B(:,4).' B(:,6).']

---------------------------------------------------------

Output

B =

   18   17   16   15   14   13
   12   11   10    9    8    7
    6    5    4    3    2    1

va =

   17   11    5   14    8    2

vb =

    4    3    2    1   17   11    5

vc =

   17   11    5   15    9    3   13    7    1

Add a comment
Know the answer?
Add Answer to:
using matlab Create the following matrix B. [18 17 16 15 14 13] 12 11 10...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Problem 5 Create the following matrix by typing elements explicitly one command. Do not type individual...

    Problem 5 Create the following matrix by typing elements explicitly one command. Do not type individual 0 00 0 0 o o 0 0 0 0 0 1 2 3 F=0 01 10 20 0 0 2 8 26 0 0 3 6 32 E 0 045 6 0 0 7 8 9 Problem 6 Create two row vectors: a -4 10 0.5 1.8 -2.3 7, b [0.7 9 -53-0.6 12 (a) Use the two vectors in a MATLAB command...

  • 2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate...

    2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate the sum of the first row of B Evaluate the maximum value in the vector resulting from element-by-element multiplication of the first column of B with the third column of A. Use element-by-element division to divide the third row of A by the first three elements of the second column of B and evaluate the sum of the elements of the resulting vector.

  • Can you kindly do the 2 (a, b, c, d, e) 3( a, b) and 4...

    Can you kindly do the 2 (a, b, c, d, e) 3( a, b) and 4 1. (5 pts) Open and edit a script named LO3.m and create the following arrays A [ 2 -3 11 B [2 3 -1] C=[ 12 14 16 18 20 22] D=[0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25] 1 1.5 2 2.5 3 3.5 N1.5 0.5 -0.5-1.5-2.53.5 2 -2 -2 2 2 2 -1 π_3 2-1 P=140 20 0-20-40-601 and Q=PT 2....

  • How is Problem 1 (a through e) typed up in Matlab? I would like to know...

    How is Problem 1 (a through e) typed up in Matlab? I would like to know how the commands is typed up along with solution please. Assignment 6 Problem 1) Consider the two following matrix, 1 4 2 2 4 100 and B In(A) 7 9 7 3 42 a) Select just the second row of B. b) Evaluate the sum of the second row of B. c) Multiply the second column of B and the first column of A...

  • Q 9 to 12 on matlab Create the following matrix by using vector notation for creating...

    Q 9 to 12 on matlab Create the following matrix by using vector notation for creating vectors with 9 constant spacing and/or the iinspace command. Do not type individual elements explicitly 20 3 в - 4 03 Using the colon symbol, create a 4 x 6 matrix (assign it to a variable named Anine) in which all the elements are the mumber 9. 10Create the following matrix by typing one command. Do not type individual elements explicitly C o o...

  • 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ) The...

    7 8 9 10 11 12 13 14 15 16 17 18 19 20 ) The human heart is found in which location? 10 Between the right midclavicular line and the right border of the sternum and below the clavicle to the eighth rib 20 Between the second and the fifth intercostal spaces from the right edge of the sternum to the loft midclavicular line 30 Between the third and sixth intercostal spaces from the left midclavicular line to the...

  • Matlab answer only Form 1 6) [10 pts] Consider the following two matrices B=[S A 3...

    Matlab answer only Form 1 6) [10 pts] Consider the following two matrices B=[S A 3 1 5 -7 4 6-3] a) Obtain the sum of each row of matrix A. b) Use the size function to create a magic matrix P which has the same size as matrix A. c) Create a matrix called Q from the second column of matrix A d) Extract the four numbers in the lower left-hand corner of matrix A and create matrix R....

  • 15, 17, 14, 16, 12, 9, 19, 10, 13, 11 First: Create an iterative distribution table...

    15, 17, 14, 16, 12, 9, 19, 10, 13, 11 First: Create an iterative distribution table consisting of 4 categories, then distribute the data on this table. Second: Calculate the cumulative iterations of the iterative distribution schedule. Third: Calculate the relative frequencies and the cumulative relative frequencies. Fourth: If we consider that the student who received less than 12 deposits, calculate the percentage of successful students. Fifth: Calculate the arithmetic mean from the iterative distribution schedule that you created in...

  • Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called ...

    help wanted? Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called d from the third column of matrix a. (Hint, typing d 22: 5: 821 b) Combine matrix b and matrix d to create matrix e, a two-dimensional matrix with three rows c) Combine matrix b and matrix d to create matrix f, a one-dimensional matrix with six rows and d) Create matrix g from matrix a and the first three element of matrix...

  • MATLAB QUESTIONS [1pts] Create the following vectors (prob01a, b): A = 10 thru 1 B =...

    MATLAB QUESTIONS [1pts] Create the following vectors (prob01a, b): A = 10 thru 1 B = 1 thru 4.2 with ten equally spaced elements [3pts] Perform the following operations on the vectors A and B element by element (prob02a, b, c) multiply B and A divide B by A AB + BA [3pts] Create a matrix E, using A and B vectors as row 1 and row 2 respectively (prob03a, b, c) find the size of E find the length...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT