문제

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

도움이 되었습니까?

해결책

Something like this?

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

Assign value:

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

Reference:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top