Dear friends; I have a code which is not suitable for big matrices or unlimited matrice. I would like to make it better because some times i have a very big matrices such as A = (100,100)
A = zeros(n,n) matrix.
R = [ 0 0 0 1 1] vector
c=2
if R(5,1) == 1
A(5,5) = c A(5,4) = - c A(4,5) = - c else A(5,5) = 0 A(5,4) = 0 A(4,5) = 0endif R(4,1) == 1 A(4,4) = c + A(5,5) A(3,4) = - c A(4,3) = - celse A(4,4) = 0 A(3,4) = 0 A(4,3) = 0end...ansA = 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 0 0 0 -2 4 -2 0 0 0 -2 2
Thanks in advance, your help always appreciated
Best Answer