Choose the function to solve the following problem, symbolically, in the easiest way. 3x+y=5 and 2x+3y=7

Nguyễn Hào

New member
Choose the function to solve the following problem, symbolically, in the easiest way.
3x+y=5 and 2x+3y=7
A. linsolve(x,y) where x and y are the co-efficient and result matrix respectively
B. solve(x,y) where x and y are the co-efficient and result matrix respectively
C. sol(x,y) where x and y are the co-efficient and result matrix respectively
D. the equations are not solvable
 
Answer: a
Explanation: ‘linsolve’ performs LU factorization method to find the solution of a system of equation AX=B. The syntax is ‘linsolve(x,y)’ where x is the co-efficient matrix while b is the result matrix. The function solve () could’ve been used, but the expressions within parentheses should be the equations, within apostrophes, declared as strings. Same for sol. Hence, option linsolve(x,y) where x and y are the co-efficient and result matrix respectively is correct.
Output: linsolve([3,1;2,3],[5;7]
ans=
1.1428571428571428571428571428571
1.5714285714285714285714285714286
 

Tìm kiếm

Back
Top