Question

How can I convert this to C# equivalent?

    togeolat=dblarr(3,3)
    togeolat[0,0]=cos(!DPI/2-Dlat)
    togeolat[0,2]=sin(!DPI/2-Dlat)
    togeolat[2,0]=-sin(!DPI/2-Dlat)
    togeolat[2,2]=cos(!DPI/2-Dlat)
    togeolat[1,1]=1.

Is it just a 3 x 3 matrix with elements in this configuration?

00 , 01 , 02

10 , 11 , 12

20 , 21 , 22

Was it helpful?

Solution

Something like this?

double[,] array = new double[3, 3];

Assign value:

array[0,0] = Math.Cos(!DPI/2-Dlat);

Reference:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top