Create three row vectors:
a = [3 -1 5 11 -4 2] , b = [7 -9 2 13 1 -2] , c = [-2 4 -7 8 0 9]
(a) Use the three vectors in a MATLAB command to create a 3 x 4 matrix
such that the first, second, and third rows consist of the last four elements
of the vectors a, b, and c, res pectively.
(b) Use the three vectors in a MATLAB command to create a 3 x 3 matrix
such that the first, second, and third columns consist of the first three elements of the vectors a, b, and c, respectively.
Create a 6 x 6 matrix in which the middle two rows and the middle two columns
are 1s and the rest of the entries are Os.
Solution
The vector now has 5 elements. Eliminate the 6th element.
สร้างเวกเตอร์แถวสาม: =เป็น [3 11 5-1-4, 2] b = [7-9 2 13 1 -2], c = [4-2-7 8 0 9] (ก) ใช้เวกเตอร์สามคำสั่ง MATLAB เพื่อสร้างเมทริกซ์ 3 x 4 ที่หนึ่ง ที่สอง และแถวที่สามประกอบด้วยองค์ประกอบสี่ ของเวกเตอร์ a, b และ c, res pectively (ข) ใช้เวกเตอร์สามคำสั่ง MATLAB เพื่อสร้างเมทริกซ์ 3 x 3 ที่หนึ่ง ที่สอง และคอลัมน์ที่สามประกอบด้วยองค์ประกอบสามแรกของเวกเตอร์ a, b, c และตามลำดับสร้างเมทริกซ์ 6 x 6 ที่กลาง 2 แถวและคอลัมน์กลางสอง มี 1s และส่วนเหลือของรายการระบบปฏิบัติการ โซลูชั่นเวกเตอร์ตอนนี้มี 5 องค์ประกอบ กำจัดองค์ประกอบ 6
การแปล กรุณารอสักครู่..
