integer*2 ia(ne),ja(ne),ns(nc,2),li(nli),jod(np,2) real*4 u(n3),aa(ne),ea(ne),x(nn),y(nn),z(nn), & sq(3),sh(3),dc(3),sk(6,6),a(na),qd(np) !读节点坐标、支座约束、左右节点号、截面面积、弹性模量信息 read(1,*) (x(i),y(i),z(i),i=1,nn), & (ns...
s1%no、s2%name、s(1)%score(1)、s(2)%age 派生类型的成员也是派生类型,那就逐级引用 s1%adder%city、s(2)%adder%street_no 【程序示例】设有3个候选人,每次输入一个得票候选人的编号,最后输出每人的得票数 program ex405 implicit none integer I,j,k,NO1 TYPE PER integer NO character*8 Name i...
INTEGER*2 Fortran array px Pointer to the real or imaginary data of the array n Number of elements to copy Description mxCopyInteger2ToPtr copies n INTEGER*2 values from the Fortran INTEGER*2 array y into the MATLAB® array pointed to by px, either a real or an imaginary array. Sets...
mxCopyInteger2ToPtrcopiesnINTEGER*2values from the FortranINTEGER*2arrayyinto the MATLAB®array pointed to bypx, either a real or an imaginary array. Sets up standard Fortran arrays for passing as arguments to or from the computation routine of a MEX-file. Use this subroutine with Fortran ...
integer*2num1,num2 open(2,file='test.sgy',status='old',access='direct',recl=1) read(2,rec=806) num1,num2 print*,num1,num2 end num1即为采样点数。 如果使用RECL=4,即每个记录大小为16字节,3220/16=201.25,也就是要读的目标数据在第202个记录上,但不是第202个记录的起始位置。16*201=321...
INTEGER*2 is aligned on 2-byte boundaries.INTEGER*4 @ The integer data type, INTEGER*4, holds a signed integer.An INTEGER*4 occupies 4 bytes.INTEGER*4 is aligned on 4-byte boundaries.INTEGER*8 @ The integer data type, INTEGER*8, holds a signed 64-bit integer. ...
integer INT1 Converts an integer, real or complex argument to an INTEGER*1 INT2 Converts an integer, real or complex argument to an INTEGER*2 INT4 Converts an integer, real or complex argument to an INTEGER*4 INTC Converts an integer, real or complex argument to a C langu...
最小二乘法fortran应用。最小二乘法 计算地球化学 主要内容 1.基本原理2.程序编写3.应用举例 1.基本原理 一般m*n线性方程组(m>n)a11x1a12x2a21x1a22x2am1x1am2x2 a1nxnb1a2nxnb2 amnxnbm AX=b a11a12 A ...
integer :: i,jc,j(1),iter integer :: itmax iter=0; !ishape=shape(Amatrix) !m=ishape(1);n=ishape(2) allocate(p(n),r(n)) p=.false. r=.true. allocate(w(n),s(n)) w=0.;s=0. allocate(at(n,m),bAx(m)) !A=Amatrix;b=Bvector; ...
function relation(a,b,n)!本程序计算两列向量的相关系数 !a,b分别是待计算的向量 !n是向量的长度,要求两列向量等长 implicit none integer,intent(in)::n real,intent(in)::a(n),b(n)real::relation !返回的相关系数 integer::i,j !循环控制变量 real::sfenzi,sfenmu1,sfenmu2,s ...