[Fortran] 纯文本查看 复制代码 integer::N
real*8,allocatable,dimension(:,:)::a,b,c,y,f,d
allocate(f(n,2))
allocate(y(n,2))
allocate(a(n,n))
allocate(b(n,n))
allocate(c(n,n))
allocate(d(n,1))
f(:,1)=y(:,2) !dy1/dt=y2
f(:,2)=matmul(a,(-matmul(b,y(:,2))-matmul(c,y(:,1))+d)) !dy2/dt=a*(-b*y2-c*y1+d)The shapes of the array expressions do not conform.[f]
|