How can I call for a particular row or column?
Lets say I have this 8 x 6 matrix and want to call only one row or one column and assign that to a new variable, How to go about this in c#.
Here is a piece of the code:
//The Eight Solutions as one matrix
Matrix<double> eightsols = DenseMatrix.OfArray(new double[,]
{
{theta1_1 * Degrees, theta2_1 * Degrees, theta3_1 * Degrees, theta4_1 * Degrees, theta5_1 * Degrees, theta6_1 * Degrees},
{theta1_1 * Degrees, theta2_2 * Degrees, theta3_2 * Degrees, theta4_2 * Degrees, theta5_2 * Degrees, theta6_2 * Degrees},
{theta1_2 * Degrees, theta2_3 * Degrees, theta3_1 * Degrees, theta4_3 * Degrees, theta5_3 * Degrees, theta6_3 * Degrees},
{theta1_2 * Degrees, theta2_4 * Degrees, theta3_2 * Degrees, theta4_4 * Degrees, theta5_4 * Degrees, theta6_4 * Degrees},
{theta1_1 * Degrees, theta2_1 * Degrees, theta3_1 * Degrees, (theta4_1*Degrees) + Math.PI, -theta5_1 * Degrees, (theta6_1*Degrees) + Math.PI},
{theta1_1 * Degrees, theta2_2 * Degrees, theta3_2 * Degrees, (theta4_2*Degrees) + Math.PI, -theta5_2 * Degrees, (theta6_2*Degrees) + Math.PI},
{theta1_2 * Degrees, theta2_3 * Degrees, theta3_1 * Degrees, (theta4_3*Degrees) + Math.PI, -theta5_3 * Degrees, (theta6_3*Degrees) + Math.PI},
{theta1_2 * Degrees, theta2_4 * Degrees, theta3_2 * Degrees, (theta4_4*Degrees) + Math.PI, -theta5_4 * Degrees, (theta6_4*Degrees) + Math.PI}
});
Console.WriteLine("eightsols: " + eightsols);
Now, how do I get one of these Rows or column and assign to a variable?
Secondly, Lets say I coded it differently and want to combine or concatenate a set of 1x6 matrix as an one 8x6, how can I do such in c#? I know how to do it in MATLAB, but getting a lot of errors when trying to rewrite my program in c#. Does anyone knows where to find a good documentation or book for MathNet.Numerics other than their website?
Here is a potion of the code:
//Solutions 1 to 4
Matrix<double> Sol1 = DenseMatrix.OfArray(new double[,]
{
{theta1_1 * Degrees, theta2_1 * Degrees, theta3_1 * Degrees, theta4_1 * Degrees, theta5_1 * Degrees, theta6_1 * Degrees }
});
Console.WriteLine("\nSol1: " + Sol1);
Matrix<double> Sol2 = DenseMatrix.OfArray(new double[,]
{
{theta1_1 * Degrees, theta2_2 * Degrees, theta3_2 * Degrees, theta4_2 * Degrees, theta5_2 * Degrees, theta6_2 * Degrees }
});
Console.WriteLine("\nSol2: " + Sol2);