Hi Guys,
I'm coming from MATLAB background & I'm trying to learn C#.
In my program, I'm at the point where I need to divide two arrays.
My understanding is arrays are multiplied/divided according to matrix rules.
I'm multiplying (225x225) X (225,1). I'm expecting an answer with (225,1)!
However, P = A\R isn't working & is throwing 3 errors.
My question is: Is right division a thing in C#?
If yes, why isn't it working? Am I missing something?
If no, how do I go about inverting matrix A in C#?
I'm coming from MATLAB background & I'm trying to learn C#.
In my program, I'm at the point where I need to divide two arrays.
My understanding is arrays are multiplied/divided according to matrix rules.
I'm multiplying (225x225) X (225,1). I'm expecting an answer with (225,1)!
However, P = A\R isn't working & is throwing 3 errors.
My question is: Is right division a thing in C#?
If yes, why isn't it working? Am I missing something?
If no, how do I go about inverting matrix A in C#?
C#:
int Imax = 15;
Int Jmax = 15;
double[,] A = new double[Imax * Jmax, Imax * Jmax]; // Gives 225x225 square matrix
double[,] R = new double[Imax * Jmax, 1]; // Gives 225x1 matrix
// The equation governming the problem is: A x P = R
// I have to calculate P by doing by multiplying by invers (or right division)
Pressure = A\R;