top of page
Search
When to use the 'allocatable' keyword when declaring dynamic arrays in Fortran
It can confuse when to use allocatable keyword when declaring dynamic arrays. We have two scenarios to declare the array here First...
Adisorn O.
2 days ago1 min read
3 views

How to Create Matrix and Vector in modern Fortran (from 2003)
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 10, 20241 min read
11 views

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/...
Adisorn O.
Jul 9, 20242 min read
5 views

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...
Adisorn O.
Jul 8, 20241 min read
11 views

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...
Adisorn O.
Feb 24, 20241 min read
6 views

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...
Adisorn O.
Feb 23, 20243 min read
14 views

Adisorn O.
Feb 17, 20240 min read
14 views

A Unified Method for Numerical Integration
Trapezoidal rule Simpson's 1/3 rule
Adisorn O.
Dec 27, 20231 min read
10 views

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...
Adisorn O.
Dec 6, 20232 min read
9 views

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,...
Adisorn O.
May 10, 20231 min read
27 views

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,...
Adisorn O.
May 2, 20231 min read
20 views

Adisorn O.
May 1, 20230 min read
9 views

Adisorn O.
May 1, 20230 min read
16 views

2 views

13 views

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...
Adisorn O.
Apr 29, 20231 min read
18 views

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...
Adisorn O.
Apr 17, 20231 min read
14 views

6 views

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:...
Adisorn O.
Mar 17, 20231 min read
14 views
bottom of page