solutions.txt
Tue Oct 11 08:17:44 2011
1
solutions.txt
Tue Oct 11 08:17:44 2011
2
* ./exercise4/factorial.f90
PROGRAM factorial !* calculate the first factorials of the numbers 1 -> 8
IMPLICIT NONE
IN
Handout Six Part II
November 3, 2011
1
Supplementary Notes : Solving an Initial Value Problem for an Ordinary Differential Equation
It is not the aim of these notes to teach a course on the numerical
solutions.txt
Mon Oct 31 08:24:34 2011
1
solutions.txt
Mon Oct 31 08:24:34 2011
2
* ./part1.f90
PROGRAM classproj1 !* Program to multiply together two matrices mat1 & mat2 and store !* the result in m
solutions.txt
Mon Oct 24 10:41:19 2011
1
solutions.txt
Mon Oct 24 10:41:19 2011
2
* ./exercise4/internal4.f90 * ./exercise2/internal2.f90
PROGRAM internal4 PROGRAM internal2 ! * Example of a Program w
solutions.txt READ*,n sinx=x dummy=x PRINT*,'Calculating Term',1 DO i=3,2*n-1,2 !* Loop through starting with the second term (-x^3/3!) ans stopping !* loops up to 2*n-1 for the last term. PRINT*,'Cal
Extra Question Handout Three
Consider the following series of numbers. 1,1,2,3,5,8,13,21,34,55,89,144 The first two elements of the series are set to one. From then on the next term in the series is s
Extra Exercises Handout Two
October 5, 2011
Question One
Write a fortran code to compute the sum of the squares of the first n integers.Use a single `DO' loop to do this along with a `REAL' data type
Handout One
Extra Exercise
To start make sure you are in the root directory of your home area, remember you can simply type `cd' then press `Enter' to take you there. Make a new directory called `hand
solutions.txt 16 17 18 The root is estimated as : -19.440536 The number of iterations taken was 18 Equation Two = -19.440918 -19.440613 -19.440613 -19.440308 -19.440308 -19.440460 -19.440613 -19.44046
solutions.txt vv(loop)=vv(index) vv(index)=tmp_elem EXIT ENDIF END DO END FUNCTION find_pivot ! * FUNCTION back_sub(mat1,vv) !* Perform back substitution on an upper triang. matrix REAL,DIMENSION(:,:)
external.txt
Fri Dec 16 12:10:30 2011 = MT4112 Exam January 2010 =
1
% QUESTION ONE %
= Part (a) = Call by reference : unit, is NOT copied Instead a reference instead.The address access the value or c
stud_solutions.txt
Fri Jan 08 13:04:22 2010
1
% QUESTION ONE %
= Part (a) = = MODULE cat_mod IMPLICIT NONE CONTAINS ! * FUNCTION getmat(m,n) !* Function to input a matrix from the keyboard. The number
`SELECT CASE' Construct & Exam
Handout Nine
1
`SELECT CASE' Construct
The `SELECT CASE' Construct is another decision making or branching construct to control the flow of your codes.
1.1
The `IF THEN
Simple File Input & Output
Handout Eight
Although we are looking at file I/O (Input/Output) rather late in this course, it is actually one of the most important features of any programming language. T
Handout Seven November 24, 2011
1
Third look at arrays
So far you have learnt how to declare arrays and you have made use of `REAL' arrays to represent matrices in your matrix library module, where th
Handout Six November 3, 2011
1
Fortran 90 Modules
So far you have only been introduced to one type of `program unit', that is, the main program unit. At first, in the main program unit, you were shown
Handout Five October 28, 2011
1
Internal Functions & Subroutines
The main program unit can accommodate (`CONTAINS') two types of procedures (often called subprograms). These can be used to break up a
Handout Four October 24, 2011
1
1.1
Characters & Strings in Fortran
Declaration
In handout two of your notes (section 2.3) you were briefly shown how to declare various character types. A table simila
Handout Three October 13, 2011
1
Arithmetic Expressions with Integers & Reals
Mostly you will find that typing in arithmetic expressions is intuitive and does not really cause any problems. However, t
The Fortran Basics
Handout Two October 2, 2011
A Fortran program consists of a sequential list of Fortran `statements' and `constructs'. A statement can be seen a continuous line of code, like `b=a*a*
Introduction to Programming Fortran 90
Handout One September 26, 2011
Part I
Course Outline
1 Preliminaries
The aim of this course is to teach you how to write mathematical computer programs in FORTRA
solutions.txt !* absolute error is less than the given tolerance (tol). The !* eigenvalue is returned in (eigv) and the eigenvector is !* returned in x !* Dummy arguments REAL, DIMENSION(:,:), INTENT(
solutions.txt
Mon Nov 28 08:31:33 2011
1
solutions.txt
Mon Nov 28 08:31:33 2011
2
* ./part3.f90
PROGRAM part3 infnorm=MAXVAL(ABS(vec) END FUNCTION infnorm
!* Calculates the infinity norm of vector vec
solutions.txt
Tue Mar 21 16:10:03 2006
1
solutions.txt INTEGER : i
Tue Mar 21 16:10:03 2006 ! * Loop variable
2
PROGRAM part2 !* Program to multiply together two matrices mat1 & mat2 and store !* the