nxn matrix as an input argument in function
function x = matrix(b, L, U)
A= L * U
x= inv(A)*b
end
I am trying to write a function that solves for an matrix, a known vector and an unknown vector. How can I make the above work? In what form am I to input b, L and U into the function arguments?
For
b = $ begin{pmatrix}a\ b \ c end{pmatrix} $.
L =$ begin{pmatrix} d & e & f\ g & h & i \ j & k & lend{pmatrix} $
U=$ begin{pmatrix} m & n & o\ p & q & r \ s & t & uend{pmatrix} $
would my input be like this: matrix([a][b][c], [d,e,f][g,h,i][j,k,l], [m,n,o][p,q,r][s,t,u]) ??function x = matrix(b, L, U)
A= L * U
x= inv(A)*b
end
I am trying to write a function that solves for an matrix, a known vector and an unknown vector. How can I make the above work? In what form am I to input b, L and U into the function arguments?
For
b = $ begin{pmatrix}a\ b \ c end{pmatrix} $.
L =$ begin{pmatrix} d & e & f\ g & h & i \ j & k & lend{pmatrix} $
U=$ begin{pmatrix} m & n & o\ p & q & r \ s & t & uend{pmatrix} $
would my input be like this: matrix([a][b][c], [d,e,f][g,h,i][j,k,l], [m,n,o][p,q,r][s,t,u]) ?? function x = matrix(b, L, U)
A= L * U
x= inv(A)*b
end
I am trying to write a function that solves for an matrix, a known vector and an unknown vector. How can I make the above work? In what form am I to input b, L and U into the function arguments?
For
b = $ begin{pmatrix}a\ b \ c end{pmatrix} $.
L =$ begin{pmatrix} d & e & f\ g & h & i \ j & k & lend{pmatrix} $
U=$ begin{pmatrix} m & n & o\ p & q & r \ s & t & uend{pmatrix} $
would my input be like this: matrix([a][b][c], [d,e,f][g,h,i][j,k,l], [m,n,o][p,q,r][s,t,u]) ?? matrix MATLAB Answers — New Questions