Consider the following matrices: A = 0.6557 0.035 0.8491 0.9340 0.6787 0.7577 0.
ID: 3111742 • Letter: C
Question
Consider the following matrices: A = 0.6557 0.035 0.8491 0.9340 0.6787 0.7577 0.7431 0.3922 0.6555 0.1712 0.7060 0.0318 0.2769 0.0462 0.0971 0.8235 0.6948 0.3171 0.9502 0.0344 B = 0.4387 0.7655 0.1869 0.4456 0.3816 0.7952 0.4898 0.6463 Write one single MATLAB statement that generates the following vector C using the existing matrix A C = 0.6557 0.6555 0.6948 Write one single MATLAB statement that generates the following matrix D using the existing matrices A and B. D = 0.9340 0.3922 0.0318 0.8235 0.4387 0.7655 0.1869 0.4456 Write one single MATLAB statement that generates the following matrix E using the existing matrix A E = 0.8491 0.7431 0.7060 0.9340 0.3922 0.0318Explanation / Answer
A=[0.6557 0.6787 0.6555 0.2769 0.6948;0.0357 0.7577 0.1712 0.0462 0.3171;0.8491 0.7431 0.7060 0.0971 0.9502;0.9340 0.3922 0.0318 0.8235 0.0344]
B=[0.4387 0.7655 0.1869 0.4456;0.3816 0.7952 0.4898 0.6463]
% answer for problem 1.1
C=A(1,1:2:5) % C is 1,3 and 5th elements of 1st row of matrix A
% answer for problem 1.2
D=[A(4,1:4);B(1,:)] % D has 1st 4 elements of 4th row of matrix A and 1st row of matrix B
% answer for problem 1.3
E=A(3:4,1:3)% E ---- 1st 3 elements of 3rd and 4th row of A
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.