You can use java libraries for linear algebra and matrices algebra for that.
Or if you are trying to write greyscale a bitmap search for a java library that does that. Android most outer layer runs on Java language mostly
2
solved I want to write this cod e in android it is in MATLAB,