-1

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

erotavlas
  • 4,274
  • 4
  • 45
  • 104

1 Answers1

3

Something like this?

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

Assign value:

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

Reference:

Victor Zakharov
  • 25,801
  • 18
  • 85
  • 151