MATLAB: How to find inverse of matrix size nxn

inverse of matrix

I am trying to find the inverse of a matrix with size 628×628.please help me

Best Answer

HMM. Are you trying to invert an image using atool like inv, but not understand that what you really wanted to do is to turn black to white, white to black?
INV is a tool for LINEAR algebra. It is not designed to work on images.
If you have a binary image,and you wish to swap black to white, then all you need do is subtract it from 1.
iminv = 1 - im;
If your image is in grayscale, so0-255, then just do it as
iminv = 255 - im;
Perhaps this is what you are trying to do. Icannot guess why you would want to use a matrix inverse.
Related Question