How to Create Matrix and Vector in modern Fortran (from 2003)

top of page

Search

The way modern Fortran provides to create matrix and vector is more convenient, let's check the example below. OUTPUT: A = 1.00000000 ...

Adisorn O.

Jul 92 min read

LAPACK Package Testing for LU Solver Ax = b

To solve the linear system Ax = b, LAPACK provide a function dgesv() see more detail https://netlib.org/lapack/explore-html-3.6.1/d7/d3b/...

3 views

Adisorn O.

Jul 81 min read

How to pass array variables to F90 subroutine?

Consider this example of fix-sized and allocatable array case I: Fix-sized array Case II: Allocatable array One important thing to remark...

6 views

Adisorn O.

Feb 241 min read

Compute the Minimum Distance between 2 sets of coordinates

The code will compute and get the minimum distance between 2 sets of arbitrary numbers of points in 2D space. It also draws the lines...

6 views

Adisorn O.

Feb 233 min read

Introduction to Julia and comparison with MATLAB syntax

OpenAI. (2024). ChatGPT (4) [Large language model]. https://chat.openai.com Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan...

11 views

Adisorn O.

Feb 170 min read

14 views

Adisorn O.

Dec 27, 20231 min read

A Unified Method for Numerical Integration

Trapezoidal rule Simpson's 1/3 rule

10 views

Adisorn O.

Dec 6, 20232 min read

F90 subroutine for Gauss Elimination with partial pivoting

! Main Program PROGRAM SolveLinearSystem IMPLICIT NONE REAL, DIMENSION(3, 3) :: A REAL, DIMENSION(3) :: b INTEGER :: n ! Define the...

9 views

Adisorn O.

May 10, 20231 min read

Passing functions as arguments in MATLAB

MATLAB allows us to pass functions as arguments of another function. This is very useful when we call other functions (for example,...

21 views

Adisorn O.

May 2, 20231 min read

Matrix Representation of a Linear System for Multiple Load Cases Analysis

In many engineering design problems, we often have to solve the same linear system for variable load cases. As shown in the figure below,...

18 views

Adisorn O.

May 1, 20230 min read

7 views

Adisorn O.

May 1, 20230 min read

16 views

Adisorn O.

Apr 30, 20230 min read

13 views

Adisorn O.

Apr 29, 20231 min read

Newton-Raphson Method for solving nonlinear equation system and unconstrainted optimization problem

[updated 6.12.2023] For optimization problem, the optimum solution of (x1,x2) is found by setting the derivative of objectives of...

16 views

Adisorn O.

Apr 17, 20231 min read

Getting to know MATLAB's Cell

Sometimes we want to store various data types into a single array. Thinking of a container that can store various things in separate...

12 views

Adisorn O.

Mar 17, 20231 min read

MATLAB's sum() function

MATLAB provides a simple but efficient sum( ) function to sum column or row vector, as well as all elements in arrays. Syntax:...

14 views

bottom of page