A/ Generate the following row vector b=[2, 5, 8, 11. . . . . . . 20,23], then find the diagonal of b and the number of elements in this vector. B/ Write a matlab code to find sum all elements of a vector, if the vector is the following. M=[5, 7, 15, 0,55, 100,11,23] using control statement. C/ what is the output of the following code: for I= 1:4 for J = 2:7 M(I,J)=I+J End; end
A/ Generate the following row vector b=[2, 5, 8, 11. . . . . . . 20,23], then find the diagonal of b and the number of elements in this vector. B/ Write a matlab code to find sum all elements of a vector, if the vector is the following. M=[5, 7, 15, 0,55, 100,11,23] using control statement. C/ what is the output of the following code: for I= 1:4 for J = 2:7 M(I,J)=I+J End; end
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.6: The Standard Template Library (stl)
Problem 8E
Related questions
Question
![A/ Generate the following row vector b=[2, 5, 8, 11. . . . . . . 20,23], then find the diagonal of b and
the number of elements in this vector.
B/ Write a matlab code to find sum all elements of a vector, if the vector is the following. M=[5, 7,
15, 0,55, 100,11,23] using control statement.
C/ what is the output of the following code:
for I= 1:4
for J = 2:7
M(I,J)=I+J
End; end](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa3c974ad-7431-475f-9ca0-bf35eb86f67d%2F7aca751c-33ff-40ec-8323-82c58aeedfff%2Fmuh2gllb_processed.jpeg&w=3840&q=75)
Transcribed Image Text:A/ Generate the following row vector b=[2, 5, 8, 11. . . . . . . 20,23], then find the diagonal of b and
the number of elements in this vector.
B/ Write a matlab code to find sum all elements of a vector, if the vector is the following. M=[5, 7,
15, 0,55, 100,11,23] using control statement.
C/ what is the output of the following code:
for I= 1:4
for J = 2:7
M(I,J)=I+J
End; end
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr