Messin with Matrices
ã¡ãã¥ãŒã衚瀺ããã«ã¯ã¹ã¯ã€ãããŠãã ãã
Matrix operations are the base by which we manipulate numbers and data in Matlab. This chapter serves as a one-stop reference for a wide range of fundamental syntax as you get familiar. Explore the examples and play with your own, use the snippet as a quick reference when you're programming, and before long this will all be second nature.
Task
Write a program that:
- Defines the following two matrices as variables:
A=â2110183â42â1722.5â1897â3147211117ââB=â123191337ââ5106757â462214â157ââ
- Calculates the component-wise product of
AandB; - Calculates the component-wise square of matrix
A; - Calculates the component-wise square root of the sum
A + B; - Calculates the average values of each of the columns of
B; - Calculates the sum of each of the rows of
A; - Calculates the sum of all the entries of
B; - Creates a new matrix in which the third row of
Ais replaced with that ofB; - Calculates the maximum value of the average values of the rows of
A; - Creates a new matrix containing just rows 2-4 and columns 2-3 of
B.
ãã¹ãŠæç¢ºã§ãããïŒ
ãã£ãŒãããã¯ããããšãããããŸãïŒ
ã»ã¯ã·ã§ã³Â 2. ç« Â 1
AIã«è³ªåãã
AIã«è³ªåãã
äœã§ã質åããããææ¡ããã質åã®1ã€ã詊ããŠãã£ãããå§ããŠãã ãã