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!
相关阅读
在一个n位数组中找最小值的复杂度到底是多少急求 visual fortran 9.0 的 serial #,谢谢了!!!C 语言问题如何在maple下定义一个i×j矩阵,其中元素是ai,j?请教请教一个问题有没有人知道netlib怎么用?fortran给数组赋初值一问matlab中的for loop[转载] 想搞台机器作计算有人用过matlab到fortran9*的翻译器matlab2fmex吗feel stress什么算法可以解决这类问题?请教 模拟白噪声这个方程该怎么解?[请教]Origin里的批处理命令一问怎样增加C语言的库函数Help, Hamiltonian ConservationHow to print a long string in VB请问MATLAB中画bar时怎么让x变成对数坐标