1. Basic Start and Setup
MATLAB (Matrix Laboratory) is a powerful platform for engineers and scientists to analyze data, develop algorithms, and create models. This guide will walk you through its core functionalities.
1.1. Launching MATLAB and Interface Overview
Upon launching MATLAB, you'll encounter several key windows:
- Command Window: Where you type commands and view output.
- Workspace: Displays all variables currently in memory.
- Current Folder: Shows files in your current working directory.
- Editor: For writing and saving scripts and functions.
1.2. Basic Commands and Operations
Start by familiarizing yourself with essential commands in the Command Window:
clc: Clears the Command Window.clear: Clears all variables from the Workspace.who/whos: Lists / lists with details current Workspace variables.- Simple arithmetic:
2 + 3,5 * 4,10 / 2,2^3.
>> a = 5;
>> b = 3;
>> c = a + b;
>> disp(c);
8
>> clear a
>> whos
Name Size Bytes Class Attributes
b 1x1 8 double
c 1x1 8 double
Key Concept: The Command Window is your interactive console, and the Workspace keeps track of your data.