Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create the following matrix A: A=[3.4,2.1,0.5,6.5,4.2; 4.2,7.7,3.4,4.5,3.9; 8.9,8.3,1.5,3.4,3.9] In order to receive full credit for your answers, you must use concise, elegant MATLAB commands

1. Create the following matrix A: A=[3.4,2.1,0.5,6.5,4.2;

4.2,7.7,3.4,4.5,3.9;

8.9,8.3,1.5,3.4,3.9] In order to receive full credit for your answers, you must use concise, elegant MATLAB commands thar correctly compute, store, and display each answer. You may need to use one or more MATLAB commands to solve each of the parts a through h. a. Cube each element of A and store the result in a matrix named Acube. b. Subtract the average of all of the elements in A from each element and produce a matix named Delta that contains the resulting values. c. Create a matrix AA (acronym for A Augmented) by removing columns 2 and 4 of matrix A. You must do this without simply entering the values for AA. You must used MATLAB commands and features to form the new matrix from the old one. Next, find the Transpose of AA and store it as AAT. Finally, multiply each element in AA by the corresponding element of AAT and store the resulting matrix in M, e.g., M1,1 will be AA1,1 x AAT1,1, M1,2 will be AA1,2 x AAT1,2, Mn,m will be AAn,m x AATn,m, etc. [Hint: the :-operator (colon-operator) can be used to extract columns or rows or entire submatrices. The :-operator is also used to specify sequences. In sequences, one can specify a skip factor, e.g., to generate the sequence from -60 to 120 in increments of 10, one could use -60:10:120. Use your common sense and some controlled experimentation to discover a quick way to eliminate columns 2 and 4, but not columns 1, 3, and 5 from matrix A. You won't find your answer in the textbook or in MATLAB Help. You can find the answer through common sense and controlled experimentation.] d. Create a matrix B by extracting the first column of matrix A. e. Create a matrix C by extracting the second row of matrix A. f. Use the colon operator to create a matrix D by extracting the first through third columns of matrix A. g. Create a single valued matrix E by extracting the value from the 2nd row, 3rd column. h. Create a matrix F by extracting the values of elements (A1,3), (A2,4) and (A3,5) and combining them into a single matrix

.............................................................................................................................

can you show me the cod of question b to h pleas

thanks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions