Contents in a Vector
9 views (last 30 days)
Show older comments
Anne Nguyen on 26 Sep 2019
Answered: Mahesh Taparia on 30 Sep 2019
Consider the following matrix.
A= 13 10 7
1 5 9
5 15 25
How do I 1. Write the contents of the element in the last row, third column to variable m1 and print m1? 2. Write the contents of the entire third column to vector m2 and print m2? 3. Write the contents of the second and third rows to matrix m3 and print m3?
Adam Danz on 26 Sep 2019
Give this page about 10 minutes of reading and you'll not only answer those questions but you'll understand the basics of matlab indexing.
Mahesh Taparia on 30 Sep 2019
You can run the following command to access and display the array elements which you have asked. The solution is as per your question number:
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!