Author: Msc. Ing. Carlos Andrés Celi Sánchez
Semester: FEB – 2026
This repository has been created to support the teaching and learning process of the Matrix Structural Analysis course during the current academic semester. It will progressively include theoretical notes, Python codes, numerical examples, and class-based implementations, starting from the fundamental concepts of matrix structural analysis and advancing toward more refined formulations for 2D frame elements.
This repository is expected to progressively cover topics such as:
- Fundamental concepts of matrix structural analysis
- Degrees of freedom and coordinate systems
- Element local stiffness matrices
- Coordinate transformation
- Global assembly procedures
- Boundary conditions and system solution
- Internal force and displacement recovery
- Class-based Python implementation
- Advanced 2D frame elements including axial, flexural, and shear deformations
- Rigid end offsets in matrix-based formulations
At its current stage, the repository includes:
- An initial Python package for matrix-based structural analysis
- A class-based implementation for 2D moment-frame elements
- An example notebook introducing the element stiffness formulation
- Setup and dependency files for package installation
Repo_Maxtrix_Analisys/
│── examples/
│ └── Ejemplo_Class_Matricial.ipynb
│── repo_maxtrix_analisys/
│ ├── __init__.py
│ └── core.py
│── README.md
│── requirements.txt
│── setup.py
Before working with this repository, students should make sure that the following software is installed on their computers:
- Python 3.10 or newer
- Git
- Visual Studio Code
- Python extension for VS Code
- Jupyter extension for VS Code
These tools are necessary to clone the repository, create the Python environment, open the project correctly in Visual Studio Code, and run both Python scripts and notebooks.
This section explains how to correctly install and run the repository on Windows using Visual Studio Code.
Before doing anything else, students should first open a standard Windows terminal.
They may use any of the following:
- Command Prompt
- Windows PowerShell
For this course, the recommended option is:
Command Prompt
This helps avoid confusion with terminal commands, file paths, and virtual environment activation steps.
Once the Windows terminal is open, run:
git clone https://github.com/Normando1945/Repo_Maxtrix_Analisys.gitThis command will download the repository to the current folder.
After cloning the repository, enter the project folder with:
cd Repo_Maxtrix_AnalisysFrom this point on, all commands should be executed inside this folder.
Now that the repository already exists on the computer, open it in Visual Studio Code by running:
code .If this command does not work, students can simply open Visual Studio Code manually and then select the cloned repository folder.
Once the repository has been opened in VS Code, it is recommended that students continue working from the integrated terminal inside VS Code.
To open the terminal in VS Code:
- Press Ctrl + Shift + `
- Or go to the top menu and select:
Terminal > New Terminal
A terminal panel will appear at the bottom of Visual Studio Code.
Inside VS Code, verify that the selected terminal is:
- Command Prompt
If another terminal appears and students want to change it:
- Click the dropdown menu in the terminal panel
- Select Command Prompt
- Open a new terminal
From this point on, it is recommended that all commands be executed from this terminal in VS Code.
It is strongly recommended to create a virtual environment so that all students work with the same isolated Python setup.
Run:
python -m venv venvThis command will create a folder called venv inside the repository.
If students are using Command Prompt, run:
venv\Scripts\activateAfter activation, (venv) should appear at the beginning of the terminal line. This indicates that the virtual environment is active.
Once the virtual environment has been activated, install the required Python libraries with:
pip install -r requirements.txtThis step installs all the packages needed by the repository.
To allow Python to recognize the package correctly while developing and testing the code, run:
pip install -e .This is useful because the package can be modified during the semester without reinstalling it every time.
If students are going to work with notebooks in VS Code, it is recommended to also install ipykernel:
pip install ipykernelThen register the environment as a Jupyter kernel:
python -m ipykernel install --user --name=venv --display-name "Python (Matrix Analysis)"This will allow students to select the correct Python environment when opening notebooks.
Inside Visual Studio Code, follow these steps:
- Press Ctrl + Shift + P
- Search for:
Python: Select Interpreter - Choose the interpreter corresponding to the
venvenvironment
If a notebook is opened, also make sure that the selected kernel is:
Python (Matrix Analysis)
A simple way to verify the installation is to open Python and try importing the main package.
Run:
pythonThen type:
import repo_maxtrix_analisys
print("Package imported successfully")If no error appears, the installation was completed correctly.
The repository currently includes an introductory notebook:
examples/Ejemplo_Class_Matricial.ipynb
This notebook presents the matrix-based formulation of a 2D moment-frame element and its implementation in Python using a class-based approach.
For each class session, students are encouraged to follow the workflow below:
- Open the repository folder in VS Code
- Open the integrated Command Prompt terminal
- Activate the virtual environment
- Verify that the correct Python interpreter has been selected
- Open the corresponding notebook or Python file
- Run the examples step by step
- Modify the examples progressively as discussed in class
- Save the updated work in an organized manner
This workflow helps maintain consistency during the semester and reduces the most common installation and execution errors.
Since the repository will be updated progressively during the semester, students should regularly download the latest changes from GitHub.
Open Command Prompt or the integrated terminal in VS Code.
cd Repo_Maxtrix_AnalisysIf students are using Command Prompt, run:
venv\Scripts\activate git pullThis command downloads and merges the most recent changes from the remote repository into the local copy.
Students are encouraged to run git pull before starting each class session in order to work with the latest version of the repository.
git clone https://github.com/Normando1945/Repo_Maxtrix_Analisys.git
cd Repo_Maxtrix_Analisys
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
pip install -e . cd Repo_Maxtrix_Analisys
venv\Scripts\activate
git pull- If Git is not recognized in the terminal, it must be installed and added correctly to the system path.
- If Python is not recognized in the terminal, verify that Python was installed correctly and added to the system path.
- If a notebook does not run, first verify that the correct Python interpreter and Jupyter kernel have been selected.
- It is recommended that all package installations be done only after activating the virtual environment.
- Students should avoid installing packages globally unless it is absolutely necessary.
- Since the repository is installed in editable mode, updates to the package files will be reflected directly without reinstalling the package in most cases.
This repository is maintained exclusively by the course author.
Students are expected to clone the repository and update their local copies during the semester. They should not modify the original online repository.
If students wish to experiment with the code, they are encouraged to do so in their local copies or in personal forks of the repository.
If you use this repository in academic work, class projects, reports, or educational material, please cite it as follows.
@misc{celi2026matrix,
author = {Carlos Andrés Celi Sánchez},
title = {Matrix Structural Analysis: Introduction to Matrix-Based Analysis of Structures},
year = {2026},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/Normando1945/Repo_Maxtrix_Analisys}}
}Celi Sánchez, C. A. (2026). Matrix Structural Analysis: Introduction to Matrix-Based Analysis of Structures [Structural Engineering]. GitHub. https://github.com/Normando1945/Repo_Maxtrix_Analisys
This project is licensed under the MIT License. See the LICENSE file for more details.
This repository is maintained by the author as the official course repository for Matrix Structural Analysis.
Students are encouraged to use the repository, report bugs, and suggest improvements whenever necessary. Nevertheless, the official development and organization of the repository remain under the supervision of the author.
Suggestions for improvement may be shared through issues or pull requests, which will be reviewed before any change is incorporated into the repository.
Students are encouraged to keep this repository updated throughout the semester and use it as the main reference point for class examples, numerical implementations, and progressive development of matrix-based structural analysis tools in Python.
