MATLAB: Dividing row matrices to give row matrices

matrix manipulationout of memory

Hi,
I am dividing a 1×5000 by a 1×5000 matrix and, depending on how I code it, either get a single value or a 5000×5000 matrix which then means I cannot process anymore as the memory has been exceeded.
It is only a single row in the 5000×5000 matrix that is populated by real numbers, is there a way to make Matlab output just that row rather than having to extract it from the square matrix?

Best Answer

What are you trying to achieve exactly? It sounds like you are doing a/b or a\b which are totally different operations. a\b will calculate a matrix X such that a*X = b. You dont have to do a a\b to get the row, its the same like doing b./a(end).