GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sametyilmaztemel/matlab-fundamentals: 11 progressive MATLAB lessons - commands, variables, arrays, vectors, indexing - from beginner to scientific computing.

BranchesTags
Open more actions menu

Latest commit

 

History

33 Commits
33 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
lesson_01_commands.m
lesson_01_commands.m
 
 
lesson_02_variables.m
lesson_02_variables.m
 
 
lesson_03_save_load.m
lesson_03_save_load.m
 
 
lesson_04_builtin_functions.m
lesson_04_builtin_functions.m
 
 
lesson_05_scripts.m
lesson_05_scripts.m
 
 
lesson_06_arrays.m
lesson_06_arrays.m
 
 
lesson_07_vectors.m
lesson_07_vectors.m
 
 
lesson_08_array_functions.m
lesson_08_array_functions.m
 
 
lesson_09_indexing.m
lesson_09_indexing.m
 
 
lesson_10_extracting.m
lesson_10_extracting.m
 
 
lesson_11_modifying_arrays.m
lesson_11_modifying_arrays.m
 
 
run_all_lessons.m
run_all_lessons.m
 
 

Repository files navigation

MATLAB Fundamentals šŸš€

MATLAB License Lessons Language

A comprehensive, hands-on introduction to MATLAB programming. This repository contains 11 progressive lessons covering everything from basic commands to array manipulation — the essential building blocks for scientific computing, data analysis, and engineering with MATLAB.

šŸ“‘ Table of Contents

  • About
  • Prerequisites
  • Lessons
  • Quick Start
  • Topics Covered
  • File Structure
  • Key Concepts Summary
  • Contributing
  • License

About

This tutorial series was designed for beginners who want to learn MATLAB from scratch. Each lesson is a self-contained .m script file with detailed comments explaining every concept. The lessons build progressively — start from Lesson 01 and work through sequentially for the best learning experience.

Prerequisites

  • MATLAB (any recent version: R2020a or later recommended)
  • Or GNU Octave (free alternative, compatible with most examples)
  • No prior programming experience required

Lessons

# Lesson File Description
01 Basic Commands lesson_01_commands.m Command Window, arithmetic, assigning variables
02 Naming Variables lesson_02_variables.m Variable naming rules, case sensitivity
03 Save & Load lesson_03_save_load.m Saving/loading workspace data to .mat files
04 Built-in Functions lesson_04_builtin_functions.m sin, sqrt, abs, exp, constants
05 Scripts lesson_05_scripts.m Creating and running .m script files
06 Arrays lesson_06_arrays.m Scalars, row/column vectors, matrices
07 Vectors lesson_07_vectors.m Colon operator, linspace, transpose
08 Array Functions lesson_08_array_functions.m rand, zeros, ones, eye, diag
09 Indexing lesson_09_indexing.m Accessing elements with row,column indices
10 Extracting Elements lesson_10_extracting.m Ranges, multiple elements, end keyword
11 Modifying Arrays lesson_11_modifying_arrays.m Changing values, rows, columns, extending arrays

Quick Start

  1. Clone the repository:

    git clone https://github.com/sametyilmaztemel/matlab-fundamentals.git
    cd matlab-fundamentals
  2. Open a lesson in MATLAB:

    open lesson_01_commands.m
  3. Run a script:

    • Press F5 in the MATLAB Editor, or
    • Type the script name in the Command Window:
    >> lesson_01_commands
  4. Follow along lesson by lesson — read the comments, run the code, and experiment!

Topics Covered

Basic Operations

  • Command Window arithmetic
  • Variable assignment and workspace management
  • Output suppression with semicolons

Data Management

  • Saving and loading .mat files
  • The clear command
  • File formats (binary .mat vs ASCII text)

Functions & Scripts

  • Built-in mathematical functions (sin, cos, sqrt, exp, log)
  • Complex number support
  • MATLAB constants (pi, inf, NaN)
  • Creating and running script files

Arrays & Vectors

  • Manual array creation with square brackets []
  • Scalars, row vectors, column vectors, matrices
  • The colon operator start:step:end
  • linspace for evenly spaced vectors
  • Transpose operator '

Array Creation Functions

  • rand(n), rand(r,c) — random matrices
  • zeros(r,c) — zero-filled matrices
  • ones(r,c) — ones-filled matrices
  • eye(n) — identity matrices
  • diag(v) — diagonal matrices
  • randi(max,r,c) — random integers

Indexing & Manipulation

  • 1-based indexing: array(row, column)
  • The end keyword for last-index access
  • Extracting rows, columns, and sub-ranges
  • Modifying individual elements, rows, and columns
  • Extending arrays dynamically

File Structure

matlab-fundamentals/
ā”œā”€ā”€ README.md
ā”œā”€ā”€ lesson_01_commands.m
ā”œā”€ā”€ lesson_02_variables.m
ā”œā”€ā”€ lesson_03_save_load.m
ā”œā”€ā”€ lesson_04_builtin_functions.m
ā”œā”€ā”€ lesson_05_scripts.m
ā”œā”€ā”€ lesson_06_arrays.m
ā”œā”€ā”€ lesson_07_vectors.m
ā”œā”€ā”€ lesson_08_array_functions.m
ā”œā”€ā”€ lesson_09_indexing.m
ā”œā”€ā”€ lesson_10_extracting.m
└── lesson_11_modifying_arrays.m

Key Concepts Summary

% Variables & Arithmetic
result = 3 * 5;          % Assign to variable
result = result + 1;     % Update variable

% Built-in Functions
y = sin(pi/2);           % y = 1
z = sqrt(-9);            % z = 3i (complex!)

% Arrays
row = [1 2 3];           % Row vector
col = [1; 2; 3];         % Column vector
mat = [1 2; 3 4];        % 2x2 matrix

% Vector Creation
v1 = 1:5;                % [1 2 3 4 5]
v2 = 0:0.5:2;            % [0 0.5 1 1.5 2]
v3 = linspace(0,1,5);    % [0 0.25 0.5 0.75 1]

% Array Functions
R = rand(3,4);           % 3x4 random matrix
Z = zeros(2,3);          % 2x3 zero matrix
I = eye(4);              % 4x4 identity matrix

% Indexing
val = R(2,3);            % Element at row 2, col 3
row = R(1,:);            % Entire first row
col = R(:,end);          % Last column

% Modifying
R(1,1) = 99;             % Change single element
R(:,2) = [0;0;0];        % Replace entire column

Contributing

Contributions are welcome! Feel free to:

  • Open an issue for suggestions or corrections
  • Submit a pull request with improvements
  • Share this repository with fellow learners

License

This project is licensed under the MIT License — see the repository for details.


Author: Samet Yilmaz Temel

If you found this helpful, please consider giving it a ⭐ star!

About

11 progressive MATLAB lessons - commands, variables, arrays, vectors, indexing - from beginner to scientific computing.

Topics

arraysdata-analysisengineeringfundamentalslearningmatlabmatlab-scriptsprogrammingscientific-computingtutorialvectors

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.