自己写的见下图,但报错,
fortran数值计算用到二维坐标系转换,有个转换矩阵(3*3)的,用数组怎么表示啊?
答案:1 悬赏:60 手机版
解决时间 2021-01-29 22:09
- 提问者网友:眉目添风霜
- 2021-01-29 02:17
最佳答案
- 五星知识达人网友:你哪知我潦倒为你
- 2021-01-29 02:41
Program www_fcode_cn
Implicit None
real , parameter :: PI = 3.141592654
integer , parameter :: m=2,n=2
real :: a(m,n) !// 应该是 real 吧?
a = reshape( [ sin(pi/2) , cos(pi/2) , 3. , 4. ] , shape(a) )
write(*,*) a
End Program www_fcode_cn
Implicit None
real , parameter :: PI = 3.141592654
integer , parameter :: m=2,n=2
real :: a(m,n) !// 应该是 real 吧?
a = reshape( [ sin(pi/2) , cos(pi/2) , 3. , 4. ] , shape(a) )
write(*,*) a
End Program www_fcode_cn
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯