C*S
2 楼
It depends what fortran you are using.
do xi=-100,100,2
x(i)=xi
end do
in Fortran90 or Fortran95, you may find something easier.
like
INTEGER D(3)
D = (/1:5:2/) ! Triplet form
D = (/(I, I=1, 5, 2)/) ! Implied-do loop form
check you fortran help file, coz this could also be version dependable.
Different companis have some specific function or syntax on this.
【在 g******s 的大作中提到】
: matlab中为x=-100:2:100;请问用fortran该怎么写?先谢了!BOW!
do xi=-100,100,2
x(i)=xi
end do
in Fortran90 or Fortran95, you may find something easier.
like
INTEGER D(3)
D = (/1:5:2/) ! Triplet form
D = (/(I, I=1, 5, 2)/) ! Implied-do loop form
check you fortran help file, coz this could also be version dependable.
Different companis have some specific function or syntax on this.
【在 g******s 的大作中提到】
: matlab中为x=-100:2:100;请问用fortran该怎么写?先谢了!BOW!
g*s
3 楼
thanks a lot! I am using Unix system. Matlab is too slow for me and I am
changing my matlab codes to Fortran.
Does Unix have Fortran90 or 95 compiler? How can I know if Unix have the
compiler or not? I have to do matrix adding, comlex, fourier tranform etc, any
good book recommend?
Thanks a lot!
【在 C***S 的大作中提到】
: It depends what fortran you are using.
: do xi=-100,100,2
: x(i)=xi
: end do
: in Fortran90 or Fortran95, you may find something easier.
: like
: INTEGER D(3)
: D = (/1:5:2/) ! Triplet form
: D = (/(I, I=1, 5, 2)/) ! Implied-do loop form
: check you fortran help file, coz this could also be version dependable.
changing my matlab codes to Fortran.
Does Unix have Fortran90 or 95 compiler? How can I know if Unix have the
compiler or not? I have to do matrix adding, comlex, fourier tranform etc, any
good book recommend?
Thanks a lot!
【在 C***S 的大作中提到】
: It depends what fortran you are using.
: do xi=-100,100,2
: x(i)=xi
: end do
: in Fortran90 or Fortran95, you may find something easier.
: like
: INTEGER D(3)
: D = (/1:5:2/) ! Triplet form
: D = (/(I, I=1, 5, 2)/) ! Implied-do loop form
: check you fortran help file, coz this could also be version dependable.
C*S
4 楼
if you need to do FT, you better choose matlab. I do not know wether you can
find the library for FT under Fortran.
Also, since you are dealing matrix, matlab is a good choice.
If not too many loops, and you vectorized your program of matlab, it should
not be very slow.
Unix will have gcc, and mostly support fortran77.
You can check the help for detail, like man gcc
any
【在 g******s 的大作中提到】
: thanks a lot! I am using Unix system. Matlab is too slow for me and I am
: changing my matlab codes to Fortran.
: Does Unix have Fortran90 or 95 compiler? How can I know if Unix have the
: compiler or not? I have to do matrix adding, comlex, fourier tranform etc, any
: good book recommend?
: Thanks a lot!
find the library for FT under Fortran.
Also, since you are dealing matrix, matlab is a good choice.
If not too many loops, and you vectorized your program of matlab, it should
not be very slow.
Unix will have gcc, and mostly support fortran77.
You can check the help for detail, like man gcc
any
【在 g******s 的大作中提到】
: thanks a lot! I am using Unix system. Matlab is too slow for me and I am
: changing my matlab codes to Fortran.
: Does Unix have Fortran90 or 95 compiler? How can I know if Unix have the
: compiler or not? I have to do matrix adding, comlex, fourier tranform etc, any
: good book recommend?
: Thanks a lot!
相关阅读
有关经纪学Help to give an approximation solutionany idea to derive the constitutive law?并行的算法请教图论问题,关于找连通分支Maybe a good news to everyone here老板的程序在unix上运行没问题Abaqus: error with dynamic loading怎么用Matlab把一个3x3的矩阵diagonalize?Trace/BPT trap(coredump)?[转载] 多重积分一问help! bilinear basis function convergencLinux fortran segmentation fail.Efficiency of Maple to Matlab求教hashing 算法Interpolation求救,急!!!P P C L Beowulf计算机群测试报告请教一条直线的功率谱请问MATLAB中怎么按一定比例生成随机数?哪位大虾有经验的请支招。谢谢