Is there anyone familiar with Fortran programming, who can give me some simple ideas or resources how can I strart this project? Many thanks
Data Structures - The Permutation Group
In this project, the group of permutations on N elements (where N is probably fairly small, perhaps N= 9 or...
I have a quick question that I've always wondered exactly how to do but never needed to. Well of course now I do. I have a DO loop that loops an arbitrary number of times. I would like to open a file each time it comes around, using the DO loop iterator as part of the filename. Ideally, it would...
Hi!
I'm working on a programming project(fortran 77).
and I need to transpose a big matrix, and for the moment I'm doing it by to do-loops:
DO 20 J = 2,NP
DO 10 I = 1,J-1
T = P(I,J)
P(I,J) = P(J,I)
P(J,I) = T
10 CONTINUE
20...
Hi,
I have created data files by compiling and running a c++ code. Now I
need to open and store the contents of these files in Fortran 77
variables. But I am not able to do this. The read command does not
return the values stored in the file.
The files are having some 2003 lines and 53...
We're not talking very small. Is it the compiler? I'm using gfortran.
An example would be:
f(y)=1E-5*(y**3)
For f(40), that should be 0.64. When I compile and execute, however, it displays 0's.
If I make the coefficient 1, the result does come out to be correct.
I have an old...
Hi there
I compile the following Fortran program but it shows more error it output file.
can you help me.
with Regards,
jamshid
INCLUDE '(SCOHLP)'
INCLUDE '(PAPROP)'
*
*
******LOGICAL LFIRST
******SAVE LFIRST, ZMIN, DELTAZ
******DATA LFIRST /.TRUE./
* Initialization...
Hello everyone!
I have some binary data (list of integer and float values) stored in a memory-mapped file. I need to read this data. I know how to do this in Delphi and C, but Fortran completely stalled me. So far I managed to open my virtual file (OpenFileMapping) and create a mapview...
Fortran issue. HEEEEELP? Not a human error, somethings buggy...?
I have no clue why this is acting like this, I'm getting a strange error. I don't believe this is a human error, I've followed the examples perfectly.
The picture shows it all. I ran it once trying to use a random function and...
Hello,
I've been trying for 2 weeks now to write in fortran a MPI program that computes the Fourier transform off a real matrix and then in vers transform using fftw-3.3alpha1. I installed the libray on evry computer availbale at my school and an I was able to compile yet my code. Even if...
I have a stochastic dynamic program with markov process written in FORTRAN, below. If you comment out the write statement that says "uh, THIS SHOULD MAKE NO DIFFERENCE" and/or some of the other write statements that are just text, no variables being written, you will see a difference in the...
I'm trying to write a program for compounded interest, but am having trouble with the formattting. Any ideas? This is what I have:
program interest_calculations
!name, Assignment 5-25, to calculate interest
implicit none
real :: A !future value of the account
real :: r !annual percentage...
I'm new to this language, and my programming experience is limited (I've only done Assembly). My issues do not necessarily lie in the coding itself, but in the compiling and building.
I'm using Eclipse, on which I installed Photran. The syntax recognition and formatting of the GUI is very...
I came across a problem on the project:
my project is comprised of tens of fortran files. There is a param.h header file collecting all the parameters that are used by the program and subroutines. but after I add this line:
parameter(pi = dacos(-1.0d0))
into the param.h
the command "make "...
Alright I'm a first year physics student whose goal is to get a masters or PHD in atomic or particle physics. However I've been talking to a lot of physics grad students and the all mention using Fortran in their research. Now I've gone over my courses and the only programming class I'm required...
Hiya. I am able ot compile my program with no errors but when I run it I get the message:
Error 112, Reference to undefined variable, array element or function result.
I cannot see where I have gone wrong and more frustratingly this code was working, running producing results on the unix...
i'm trying to write the equation dB=log_10(P_2/P_1)
I just need help writing this equation into Fortran.
I know for exponents I use **, but what about subscripts?
Also, my inital thought for a fraction is /. Is this correct?
This has been bugging my (and my program) for a few days now. I'm searching for a way to convert a string (or more properly; a collect of characters) to a Real data type. I'm new to Fortran, but as I understand it there seems to be no intrinsic function to make this easy.
I have tried various...
Hello,
I am currently doing a 3rd year undergrad project on forward radio meteor scatter
the problem involves the following:
I have over 80Gbs worth of 10 second data blocks of recorded radio input.
They are stored as date stamped .bin files in binary format, each of order 1700kb or...
Hi,
I have used Compaq Visual Fortran 6.5 for years. Recently bought a new PC with Intel Core2 Quad Q6600 processor and Windows Vista 64 bit Home Premium OS (yes, likely a mistake on the OS).
I wish to use Code I wrote in the past and take advantage of 64bit processor, memory, etc.
I...
Hi,
I looked around in some forums, but couldn't find a good answer to this problem: my programmes produce several output files. When the programm is finished, I add certain simulation parameters to the file name, so that I see later, to which simulation run this file belongs.
(for example...
Hi. I need to be retrieve information far into a file without reading everything before it. Is there a way to do this? Current code is below.
Thanks,
Jeff Tibbitt
!ccccccccccccccccccccccccccccccccccccccc
program getcoord
integer i
real*4 xx(1000), yy(1000), zz(1000)
double precision...
hi friends,
I'm going to simulate the spectrum of a specific ion, with constant situation (like: density, temperature and etc).
but I don't know what should I do first!
thanks for your help
:frown:
Hi.
Can anyone be kind enough to check what's wrong with my source code?
Here's the project: http://www.dur.ac.uk/3h.physics/proj...nsmission.html
You can skip the introduction bits.
I'm stuck at the last question on Calculation Part I. I did the source code independently and it works...
Hi guys,
I am tryin to get my program to output multiple files with the name of the file dependent on a number of integer variables in the program, any help with this would be greatfully appreciated.
Cheers
Hello,
I used to do schoolwork in Fortran (Compaq Windows version).
Couple weeks ago I decided to say "good-bye" to Windows and installed Mandriva Linux.
But now I'm quiet confused how program work in work. I see that nolonger I don't have beautiful white window to write program text...
HI,
I am using fortran 90 for simulation. I write a subroutine (CALC_PORO_SOL_BANDED )where i called a linear solver LSLRB.
I called this CALC_PORO_SOL_BANDED subroutine from another two subroutine in a do loop. It works for 1 subroutine without any error but from another subroutine it works...
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:
[code]
COMPLEX FUNCTION forwards (tincdum,tstartdum,tenddum,fdum,ydum,idum,wdum&...
Hi!
Im using fortran and am trying to create a integrating program that is able to use different functions.
I have written the subroutine that will integrate but would also like it to be able to use different functions determine by user selection.
Here is my subroutine:
subroutine...
i have a fortran 90 function invoked:
iret = store_data(ncid_bfm,var_ids(n),OCET_SHAPE,NO_BOXES,garray=D3DIAGNOS(i,:))
each time i get to that line i get segmentation fault
on the calling unit variables a defined like so:
!BOP
!
! !IROUTINE: Store the results
!
! !INTERFACE...
Hi,
I'm laughing, after having passed more than one hour on a very simple program I could finish it. It does the Euclidean division between 2 numbers that one type.
It is very inefficient I agree. I gave up doing it in a more efficient way in order to simplify it (for my brain at least)...
Hi there,
I've tried all I could in order to complete a very simple and basic program that finds the roots of any quadratic binomial.
You have to enter the coefficients a, b and c and it would find the roots. I could do that, but a problem occurred if I typed a=0. Of course if a=0 the...
1. Question Statement:
Create a 40 mm by 40 mm two-dimensional grid centered on point (0,0) (grid size 1mm by 1mm so the grid is 41 points by 41 points). On this grid, put four circular electrodes, one centered on each corner, each with radius 15 mm. Fix the electrodes on the upper left and...
Euler Method in Fortran - HELP!
Using Euler method I want to calculate the equation below, deltat=0.3, 10 times.
Problem: When n=1, Yn1(1) is calculated right. But, in the following steps it should assume that Yn(2)=Yn1(1) and the program is assuming Yn(2)=0, as well as Yn(3)=0,...and so on...
Hi! I'm a MSc student and for the development of my dissertation I need to implement a simple fortran 90 program. I'm aware of the basic features of this language but I can't seem to find how to run an executable file (an external file) through fortran. My question is, how can I make the fortran...
I have the book "Schaum's Outline Series Theory & Problems PROGRAMMING WITH FORTRAN 77 copyright 1995", well from the time of this book till today(2008-9) changed a lot in FORTRAN 77 ? If yes, what points mainly ?
Well start reading this book , or buy another newer book in the subject ?
This...
Hi all,
I've recently obtained some code in Fortran 90 that was compiled with gfortran. I am compiling with f90 and one of the called statements is not recognised.
I have call flush(1) where 1 is the filename that the code is flushing.
Since flush is not a part of f90, is there an...
I am trying to write a fortran program to take an integer n and print out the first n rows of Pascal's triangle. The code I have so far:
PROGRAM PascalTriangle
IMPLICIT NONE
INTEGER i, n, j, ktemp, ktemp1, ktemp2, ktemp3, ktemp4, ktemp5
WRITE(6,*), "Enter a positive integer n:> "...
Hi all,
I'm sure this question has been asked before but I couldn't find it. However, I will ask it nevertheless...
How does one compile AND run fortran 77 & 90/95 codes on a Windows XP O/S? The fact I am asking this means I am not a computer-whizz so please take this into account when...
Hi everyone,
Currently my friend is taking fortran programming class at his university.
The instructor said every student should own any fortran software.
As I don’t have much know about it, can anyone recommend me any fortran software for this fortran programming class?
Thanks in...
Fortran compiler specific "kind" modifier.
I've recently switched over from the SilverFrost (Salford) FTN95 compiler to the open source g95 compliler. So far everything seems very compatible between the two compilers (as in the same source compiles without modification on either compiler)...
Hi All
I am new to fortran and there are things that I believe fortran should do and don't know how to do it - I am using fortran 77.
1- I know how to declare variables, but i do not know how to make sure that i start out with zeros and not use old data that might have been stored by a...
I'm just a very beginner when it comes to program and I have a question. I've read that some (old) chess engines are written in fortran so I know it's possible to create a chess engine using the fortran language. I wanted to know if someone has a link or a file providing the source of a chess...
Fortran write (or print). How to controll "new line" or not
I haven't touched fortran for about 100 years (and that's only a very slight exaggeration). Recently I had to write a very small amount of code in Fortran 95. I've picked up most aspects pretty quickly but I'm still a bit vague on...
Hello,
I've a program in FORTRAN which I need to convert to C#,
there's an assignment statement like this:
FC=10.e6
What exactly does it mean? Is it 10*10^6? or 10.000000?
Do you have some tips to convert the FORTRAN program to any
modern language (C#, JAVA, C/C++) ?
Thank You