Fortran Definition and 858 Threads
-
M
Fortran How to Pass and Combine Arrays in Fortran g77?
1. Is there a way to get the index of array, how many cells are nonzeros and have actual data. I can probably do it the hard way. 2. How do you pass an array to a function, the entire array I mean, do I do like function (array(i)) or function (array()) 3. Is there an easier way to...- mazinse
- Thread
- Fortran
- Replies: 5
- Forum: Programming and Computer Science
-
Fortran I with Fortran 90 : Simpson's rule
I must calculate \int_0^1 e^{-x} dx using the composite Simpson's rule, i.e. the common Simpson's rule but applied on many intervals between 0 and 1. This is not all : I must divide the interval [0,1] in 100 subintervals and then in 200, to compare the value obtained of the integral. And then...- fluidistic
- Thread
- Fortran
- Replies: 32
- Forum: Programming and Computer Science
-
J
Fortran How Can I Correct My Fortran Program for Newton's Method?
I'm working on a program for Newton's method for solving equations. This is my code: ======================================================= program Newton implicit real(a-h,o-z) F(x) = x**2 - 4 !...&---1---------2---------3---------4---------5---------6---------7---...- jjohnson8
- Thread
- Fortran Method Newton's method
- Replies: 1
- Forum: Programming and Computer Science
-
S
Fortran FORTRAN conversion from int to char OR zero suppression
Hello, I am new with FORTRAN but experienced with PLI/I, Cobol (mainframe), Clipper (PC) etc. As an exercise I'm writing some small pograms. Now I have one problem/question: I have an INTEGER array (ARPAS). When printing this array I want to suppress printing the zeroes; only # 0...- sergegirard
- Thread
- Fortran Zero
- Replies: 2
- Forum: Programming and Computer Science
-
T
Fortran What is the first approximation for Riemann Sum using Fortran 90?
[SOLVED] Riemann Sum with Fortran 90 My assignment: Use Reimann Sums to estimate pi to 6 decimal places (ie: you can stop when successive iterations yield a change of less than 0.000001. For the Reimann Sums solution, an iteration equals 2X the number of segments as the trial before. Print out...- ttiger2k7
- Thread
- Fortran Riemann Riemann sum Sum
- Replies: 7
- Forum: Programming and Computer Science
-
Fortran Need help with fortran 90 on an exercice
It's about Numerical Analysis and especially Newton's form of interpolation. That is, the program must ask us to input the nodes where the function (cos(x) in this case) is equal to it's interpolating polynomial. From that P(x)=a_0+a_1(x-x_0)+...+a_n(x-x_o)...(x-x_{n-1}). And then it must...- fluidistic
- Thread
- Fortran
- Replies: 5
- Forum: Programming and Computer Science
-
T
Fortran Fortran: heat transfer program quick help
You are given a solid, homogenous block of material, 48x24x12 inches suspended in air at 70 degrees. The block is initially at 70 degrees as well. Then, a laser is used to heat one corner of the block to a constant 200 degrees. Model the heat transfer through the block and report the average...- ttiger2k7
- Thread
- Fortran Heat Heat transfer Program
- Replies: 3
- Forum: Programming and Computer Science
-
S
Fortran Fortran 95/2003 Users: Connect Here
I was seeing if there is anyone who is good with Fortran 95/2003 on here?- s133kgtvr4
- Thread
- Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
L
C/C++ Running a Fortran 77 program in a C++ enviorment/program
I hope someone out there can help me out on this one. I have intermediate C++ experience, just a working level knowledge, however my prof. threw me a project to work on and where I am at now I have no experience with. So this is what's up, I have a massive fortran 77 program...that does some...- lordentropy
- Thread
- C++ Fortran Program Running
- Replies: 2
- Forum: Programming and Computer Science
-
P
Fortran What are Implicit Variables in FORTRAN and How Do They Affect Programming?
I got a new project from my professor to calculate the form factor of the cavity for his particle detector thing. He told me to get some code from a colleague, decipher it, and use it for the new cavity. The code is in FORTRAN. I've had some programming experience, so it's not so bad, but...- Poop-Loops
- Thread
- Fortran Implicit Variables
- Replies: 2
- Forum: Programming and Computer Science
-
S
Fortran Fortran 77 Nonlinear Equations Minipack
Hi! I frequently have to solve systems of nonlinear equations with Fortran. So far I used a code which I didn't write by myself which is based on a Newtonian root finder from Numerical recipes. I would like to write a Fortran code on my own, based on another Numerical subroutine available on...- Sunset
- Thread
- Fortran Nonlinear
- Replies: 6
- Forum: Programming and Computer Science
-
J
Fortran How can I improve my Fortran program to factor numbers?
Got to write a program that factors a given number(>1) Here is what I have: program Factors implicit none real::n, i print*, "enter a number:" read*, n i=2 do while (n>1) if (mod(n, i)==0) then i=i+1 n=n/i else write (*,*) ' X= ', X end if end do end program...- Jeepster
- Thread
- Factoring Fortran
- Replies: 5
- Forum: Programming and Computer Science
-
S
Fortran Help need to write fortran program
I have this program that needs to be written, but I don't know where to start. Can someone please help me with it.Thanks *1 Problem Statement Mrs. Deli is running the delicatessen store “Deli Deli”. Last year Mrs. Deli has decided to expand her business andbuild up an on-line store. She...- s133kgtvr4
- Thread
- Fortran Program
- Replies: 8
- Forum: Programming and Computer Science
-
E
Fortran Execute Excel File w/Fortran Compiler Code
Is there any code that i can use to execute a file through a fortran compiler? For example i want to execute an excel file (kk.xls) just before the termination of the main code. Thank you- ethyl
- Thread
- Fortran
- Replies: 19
- Forum: Programming and Computer Science
-
D
Fortran Outputting Bitmap Images in Fortran without Record Delimiters
In Fortran I need to output some data as a bitmap image, to visualise results. Problem is, with every WRITE statement it seems to append some unwanted bytes before and after the data itself. I have found out that these are called record delimiters, but I want to turn these off. How?- drp85
- Thread
- Fortran Images
- Replies: 7
- Forum: Programming and Computer Science
-
N
LaTeX Convert latex code to fortran code?
I have very large equations that I need to solve using numerical techniques. The equations are in latex. From these now I need to form matrix in fortran and then continue the solution procedure in fortran. Can anyone advice how I can do this conversion from latex code to fortran code. The number...- nancy2fancy1
- Thread
- Code Convert Fortran Latex
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Fortran How do I calculate the complex argument in Fortran?
Hi I need help with programming the following: (T/(T-2*d))^(i*Nu)=exp(-i*Nu*ln|T/(T-2*d)| +Nu*arg(T/(T-2*d)) I don't know how to do the arg bit in Fortran90...this is what I've tried so far A=T/(T-2*DELTA) B=EXP(-CI*NU*LOG(ABS(A))+NU*ARG(A)) but obviously it threw back an error...- miccol999
- Thread
- Argument Complex Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
S
Fortran Debugging Merge Sort Program with Fortran 90
I'm trying to write a Merge Sort program with fortran 90. However, this is what I already could do: program sorting integer :: i,ialloc,error,n,d integer, pointer :: a(:) Print *,'How many numbers would you like to type in?' Read(*,*)d Print*,' Enter the values, separated by...- Soff
- Thread
- Debugging Fortran Program Sort
- Replies: 2
- Forum: Programming and Computer Science
-
S
Fortran How Can I Modify This Program to Show Complex Roots?
Ax^2+Bx+C=0 PROGRAM delta1 IMPLICIT NONE REAL :: A,B,C REAL :: DELTA,X1,X2 PRINT *,"Enter the a,b,and c" READ *,A,B,C delta=b**2-4*a*c IF (delta>0)THEN PRINT *,"The roots are real" X1=(-B+SQRT(DELTA))/(2*A) X2=(-B-SQRT(DELTA))/(2*A) PRINT *,"X1 = ",X1,"X2 = ",X2...- surfer
- Thread
- Fortran Quadratic Quadratic equation
- Replies: 1
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Passing integers to type dimension
Why does does the following code not compile? PROGRAM TYPES INTEGER A(3) A(1)=1 A(2)=2 A(3)=3 CALL SUBR(A) print *,'Done' RETURN END C --- Here is a subroutine ----- SUBROUTINE SUBR(A)...- dimensionless
- Thread
- Dimension Fortran Integers Type
- Replies: 2
- Forum: Programming and Computer Science
-
J
Fortran Double precision computation time in fortran
I've written a program that repeats a calculation a certain number of times in single precision, then in double precision. The times are recorded by the cpu_time(real t1) subroutine. (Specifically, the calculation is aReal/(aReal+0.01) .) It seems that the time for the double calculation is 1.20...- JoAuSc
- Thread
- Computation Fortran Precision Time
- Replies: 15
- Forum: Programming and Computer Science
-
J
Fortran Troubleshooting a Fortran 77 Program with OpenMP
I'm trying to get a fortran 77 program to run faster on a computer with a dual-core processer, so I'm trying to learn how OpenMP works. Unfortunately, I can't get the "hello world" file on the wikipedia page to compile. (Here's the code: PROGRAM HELLO INTEGER ID, NTHRDS...- JoAuSc
- Thread
- Fortran Program Troubleshooting
- Replies: 8
- Forum: Programming and Computer Science
-
P
Fortran Fortran 90/95 : passing parameters to functions
Hello, I have the following doubt, maybe someone can help me with this. Suppose I have a general purpose routine that finds the zero of a function f(x), something like subroutine fzero( func, x1, x2, xzero ) implicit none real, intent(in) :: x1, x2 ! Upper and lower bounds where the...- pezze
- Thread
- Fortran Functions Parameters
- Replies: 4
- Forum: Programming and Computer Science
-
D
Fortran How many bytes in DIMENSION? - A Fortran Question
How many bytes in DIMENSION?? - A Fortran Question I'm looking at some Fortran code. Some variables are of type dimension. How do I tell if these variables are integers or floating points numbers? How do I know if they are signed or unsigned? How do I tell the number of bytes occupied by...- dimensionless
- Thread
- bytes Dimension Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
D
Fortran Can Fortran 77 still outperform highly optimized C in terms of speed?
I have some code in Fortran 77 that executes at pretty good speed. I also have a highly optimized version of the same algorithm in C. When using g77 and gcc, the unoptimized Fortran is just slightly faster that the highly optimized C. When using MSVC++ and g77, than the C is a bit faster...- dimensionless
- Thread
- Fortran
- Replies: 22
- Forum: Programming and Computer Science
-
B
Fortran Debugging Fortran Program: Getting Fluxconv Value
Hey, I wasn't sure whether or not to put this in the homework section or not because I need to complete this code for an assignment, but I thought that someone with fortran knowledge might have a better chance of seeing it in this section. PROGRAM testing ! Variable declarations CHARACTER...- big man
- Thread
- Debugging Fortran Program Value
- Replies: 4
- Forum: Programming and Computer Science
-
S
Fortran Visual Basic or Fortran? -I need your advice
Hey everyone, I have a course requirement for taking one programming class, the choices are Fortran and Visual Basic. I am not doing well as i expect in fortran, but not sure if its becuase its my first time in programming or the language difficulty. I am thinking to swap to Visual Basic...- Spirit
- Thread
- Fortran Visual
- Replies: 6
- Forum: Programming and Computer Science
-
D
Fortran Can You Use Nested Subroutines in Fortran95 and How Do You Link Them?
basic question really...can you have subroutines nested within subroutines? or are there any other types of subprograms within fortran95 other than functions and subroutines? (need one that can pass back an array) if you can [use subs within subs], how do you link them? like in the main...- dichotomy
- Thread
- Fortran Program
- Replies: 2
- Forum: Programming and Computer Science
-
C
Fortran Fortran Structures: What Are They?
Hi - I expect this is quite a simple question. What are fortran structures? I'm trying to convert fortran code into MATLAB and I don't know what a structure / endstructure statement is. e.g. structure /pixel/ union map INTEGER*4 cl INTEGER*4 rw endmap map INTEGER*4 x INTEGER*4...- cammo12
- Thread
- Fortran Structures
- Replies: 8
- Forum: Programming and Computer Science
-
F
Fortran Fortran Forum for Programming Help: Resources, Tips, and Support
Mentor's note (May 2012): This thread is closed to new posts. It is over five years old and has been resuscitated many many times by people finding it in Google searches or something. If you want to post a question about Fortran programming, please go to the parent forum...- FUNKER
- Thread
- Fortran Forum
- Replies: 177
- Forum: Programming and Computer Science
-
G
Fortran Fortran to resolve Heat tranfers problem
i need to know if someowne can help me with a program that i have to do to resolve a heat problem of the Patankat(autor) book. exercise 5.1 is the problem and to solve it i need to use the upwind method and the CDS method.. please help thanks- giber
- Thread
- Fortran Heat
- Replies: 7
- Forum: Programming and Computer Science
-
E
Fortran Localizing a Fortran Error - Get the Position of the Error
Being a newbie on Fortran I need some help with localizing an error. When I run my executable I get the message: I get that somewhere in my code there's a division by zero, which obviously will not be accepted, but my question is where? Is there a way to get the position of the error pointed...- EL
- Thread
- Error Fortran Position
- Replies: 33
- Forum: Programming and Computer Science
-
K
Fortran How to Handle Outliers in Array Data in Fortran?
Hello I have a bunch of data in a text file that got loaded into an array. Now the problem is that there are a lot of outliers. So let's say if I find the outlier, how do I get rid of it, by say move the next one to that spot. If I do that how do I redefine the arrary size. What would be...- kevin86
- Thread
- Array Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
J
Fortran Arrays with parameter and data statements in fortran 77
Let's say you have an array A and a variable B (both reals). Apparently parameter (A = (/1.2, 3.4, .../) ) is illegal, so you have to do data A /1.2, 3.4, .../ instead. However, what if you have a statement afterwards like this? 1 parameter (A = (/1.2, 3.4, .../) ) ... 2...- JoAuSc
- Thread
- Arrays Data Fortran Parameter
- Replies: 1
- Forum: Programming and Computer Science
-
S
Trying to look for a fortran compiler for my windows XP
not sure where this goes, but I am trying to look for a fortran compiler for my windows XP OS that is free so i can get into doing some programming. My school may be getting into a engineering competition and i would be a frontrunner on the team and want to get a headstart. if anyone can help i...- sublime
- Thread
- Compiler Fortran Windows
- Replies: 6
- Forum: STEM Academic Advising
-
K
Fortran Fortran spacing/coordinate question
Since the graphing idea is not available. Does the fortran write/print command let me choose where a number or * is printed at. Like a row column thing if I want to print say a * on the page. * * * * *...- kevin86
- Thread
- Fortran
- Replies: 7
- Forum: Programming and Computer Science
-
K
Fortran Drawing Polygons in Fortran: How to Use Code to Create Geometric Shapes
Anyone know the codes to draw polygons in fortran. Actually a few points work too.- kevin86
- Thread
- Fortran Polygons
- Replies: 12
- Forum: Programming and Computer Science
-
K
Fortran Fortran Newbie: Help Installing Compiler
Hi I need a fortran compiler and mostly, I need help installing those binaries or folders and files. I am a newbie and do not know how to install one of those compilers. If anyone has a better suggestion for a compiler that is free please help- kevin86
- Thread
- Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
M
Fortran How to use a variable in format statement in Fortran?
hello everyone! I was do programming in fortran and i wanted to print my answer in the format below. I was not able to do it. I have written a part of my program also. i.e, ##### greeting = 'Good Morning!' do 110 I = 1, 12 write (*,115) (greeting) 115 format (A<I>) 110 continue end ##### here i...- manugv
- Thread
- Fortran Program
- Replies: 1
- Forum: Programming and Computer Science
-
B
Fortran Fortran help: deleting items from a list
Hi , I need help to write a code for this function(fortran 77): integer function delete(id, list, n) where • delete returns 0 if the deletion was successful, -1 if the list is empty, and -2 if the user is not currently in the list. •id is the integer identification number of the user...- brad sue
- Thread
- Fortran List
- Replies: 1
- Forum: Programming and Computer Science
-
J
Fortran Fortran 90 Program for Processing Output Files | Looping Through File Names
Im trying to write a program in fortran 90 to process some output files that i have. Here is the problem I am having. All of the output files are named file.datA, file.datB,...ect. I set the variable "file" to equal file.dat. I want the program to run through a loop and each time change the...- jd1828
- Thread
- Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
J
Seeking 64-bit Linux Compiler for Fortran 95 Binary
hi, I was wondering if anyone was running 64-bit linux. In particular, I need someone to compile a 64-bit fortran95 binary for me.- jack47
- Thread
- Binary Compiler Fortran Linux
- Replies: 1
- Forum: Computing and Technology
-
E
Fortran Help with simple Fortran program
I need to write a program that will print the prime factorization of a number. Here's what I have so far: integer:: n,i print *, "enter integer" read *, n do while (n>1) i=2 if (mod(n,i)==0) then print *, i n = n/i else i = i+1 end if end do end program I'm just...- eku_girl83
- Thread
- Fortran Program
- Replies: 1
- Forum: Programming and Computer Science
-
Fortran Learn About Fortran: A Beginner's Tutorial
Believe it or not, it is still widely used! http://gershwin.ens.fr/vdaniel/Doc-Locale/Langages-Program-Scientific/Fortran/Tutorial/index.htm- Astronuc
- Thread
- Fortran Tutorial
- Replies: 24
- Forum: Programming and Computer Science
-
K
Comp Sci Help with Fortran: Get Assistance with Programming Assignment
help with fortran please i'm new with programming and i have a problem with a homework I've been assigned from university. it's quite a simple programm but I'm stuck and going crazy . can anyone please help. there seems to be a problem with the random function. but i couldn't fix it. I'm using...- Kafros
- Thread
- Fortran
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
D
Fortran Is Fortran 90/95/2003 worth learning?
It appears that the newer versions of Fortran might be the best environment for technical computing. Aside from Matlab at least. It also appears that very few entities use Fortran. Is Fortran 90/95/2003 worth learning if all I really want to do is put it on my resume?- dimensionless
- Thread
- Fortran
- Replies: 5
- Forum: Programming and Computer Science
-
J
Convert a text file into an image (or generate an image with fortran)
Hello, I just made a program that puts numbers into a two dimensional array, and then saves them in a text file that looks something like this: 4 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 4 4 4 5 5 5 5 5...- Joe1
- Thread
- Convert File Fortran Image Text
- Replies: 1
- Forum: Computing and Technology
-
J
C/C++ Can Fortran 90 match the speed of C++ in running external programs and loops?
Im writing a program in fortran 90. what I am trying to get it to do is to open an input file for another program, change a few variables. then run that program. Then when the program is done running it will change the variables in the input file again and run the program. This will be a Do...- jd1828
- Thread
- Fortran
- Replies: 14
- Forum: Programming and Computer Science
-
Fortran Solving Fortran Error on Linux: invalid number
Hi all, I am trying to run some fortran code on Linux that was originally written (and worked) on Windows. I am getting the following error: invalid number: incomprehensible list input apparent state: unit 63 named NUCLEAR.DAT last format: list io lately reading sequential formatted...- Norman
- Thread
- Error Fortran Linux
- Replies: 2
- Forum: Programming and Computer Science
-
T
Need FORTRAN Code for 3D Aerodynamic Matrices Calculation?
Hello everybody, I need a FORTRAN code (the source code) with the capability to calculate the generalized aerodynamic matrices given the modes of the structure. In particular, I need a code that is able to handle 3D structures made by assembling trapezoidal plate elements. Does anyone...- traianus
- Thread
- Code Fortran Lattice
- Replies: 20
- Forum: Mechanical Engineering