I have a very simple question, but have been unable to find an answer for it. When using fortran 90 can you use a DO loop to calculate a complex number? For example:(adsbygoogle = window.adsbygoogle || []).push({});

Code (Text):

COMPLEX FUNCTION forwards (tincdum,tstartdum,tenddum,fdum,ydum,idum,wdum&

&,lamdadum)

IMPLICIT NONE

REAL, INTENT(IN):: tincdum,tstartdum,tenddum,wdum,lamdadum,ydum,idum

COMPLEX, INTENT(IN):: ydum,idum

COMPLEX:: fn

DO ydum = tstartdum,tenddum,tincdum

fn = fofy(idum,wdum,lamdadum,ydum,fn)

ydum = ydum + tincdum*fn

END DO

forwards = ydum

END FUNCTION forwards

[code/]

Thank you

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran complex numbers and do loops

Loading...

Similar Threads for Fortran complex numbers |
---|

Fortran Successive Over Relaxation Method in FORTRAN |

If statement for Monte Carlo integration |

C/++/# How to use C++ in studying calculus |

Fortran How to buy Fortran Programming Software Commersial License |

Fortran Fortran for Computational Fluid Dynamics Problems |

**Physics Forums | Science Articles, Homework Help, Discussion**