"MATLAB The Language of Technical Computing" is a document for an introductory course in MATLAB and technical computing. This document is not a comprehensive introduction or a reference manual. Instead, it focuses on the specific features of MATLAB that are useful for engineering classes. The lab sessions are used with one main goal: to allow students to become familiar with computer software (e.g., MATLAB) to solve application problems. We assume that the students have no prior experience with MATLAB.
The availability of technical computing environments such as MATLAB is now reshaping the role and applications of computer laboratory projects to involve students in more intense problem-solving experiences. This availability also provides an opportunity to easily conduct numerical experiments and to tackle realistic and more complicated problems. Originally, the manual is divided into computer laboratory sessions.
The tutorials are independent of the rest of the document. The primary objective is to help you learn quickly the first steps. The emphasis here is “learning by doing”. Therefore, the best way to learn is by trying it yourself. Working through the examples will give you a feel for the way MATLAB operates.
In this introduction, we will describe how MATLAB handles simple numerical expressions and mathematical formulas. The following tutorial lessons are designed to get you started quickly in MATLAB. The lessons are intended to make you familiar with the basics of MATLAB. We urge you to complete the exercises given at the end of each lesson.
Table of Contents
Chapter 1 Starting with MATLAB
1.1 STARTING MATLAB, MATLAB WINDOWS
1.2 WORKING IN THE COMMAND WINDOW
1.3 ARITHMETIC OPERATIONS WITH SCALARS
1.3.1 Order of Procedures
1.3.2 Using MATLAB as a Calculator
1.4 DISPLAY FORMATS
1.5 ELEMENTARY MATH BUILT-IN FUNCTIONS
1.6 DEFINING SCALAR VARIABLES
1.6.1 The Assignment Operator
1.6.3 Predefined Variables
1.7 USEFUL COMMANDS FOR MANAGING VARIABLES
1.8 EXAMPLES OF MATLAB APPLICATIONS
Objectives and Topics
The primary objective of this laboratory guide is to provide students with a foundational understanding of MATLAB as a tool for technical computing, specifically focusing on its application in engineering environments through numerical calculations, matrix manipulation, and signal processing workflows.
- Fundamentals of the MATLAB interface and workspace management.
- Scalar arithmetic operations and mathematical built-in functions.
- Matrix generation and advanced computational linear algebra.
- Two-dimensional and three-dimensional graphical data visualization.
- Analysis and representation of discrete-time signals and sequences.
Excerpt from the Book
1.2 WORKING IN THE COMMAND WINDOW
The Command Window is MATLAB’s main window, and canm be used for executing commands, opening other windows, running programs written by the user, and managing the software. An example of the Command Window, with several simple commands that will be explained later in this chapter, is shown in Figure 1-5.
Notes for working in the Command Window:
To type a command the cursor must be placed next to the command prompt(>>).
Once a command is typed and the Enter key is pressed, the command is executed. However, only the last command is executed. Everything executed previously is unchanged.
Several commands can be typed in the same line. This is done by typing a comma between the commands. When the Enter key is pressed the commands are executed in order from left to right.
It is not possible to go back to a previous line in the Command Windows, make a correction and then re-execute the command.
Summary of Chapters
Chapter 1 Starting with MATLAB: This chapter introduces the core interface elements of MATLAB and covers essential tasks such as scalar calculations, variable definition, and the use of built-in mathematical functions.
Keywords
MATLAB, Command Window, Scalar Variables, Arithmetic Operations, Matrix Operations, Predefined Variables, Linear Algebra, Signal Processing, Data Visualization, Trigonometric Functions, Workspace, Command History, Plotting, Discrete-time Signals, Engineering Computation
Frequently Asked Questions
What is the primary scope of this laboratory manual?
This manual serves as an introductory guide for engineering students to learn technical computing using MATLAB, focusing on basic operations, matrix math, and signal analysis.
What are the core thematic areas covered in this book?
The book covers variable management, mathematical built-in functions, matrix operations, data plotting techniques, and the handling of discrete-time signals.
What is the main learning objective for students?
The goal is to enable students to perform both simple and complex arithmetic calculations and apply them to solve practical engineering problems within the MATLAB environment.
Which scientific method is emphasized in this manual?
The manual utilizes an experimental approach, where students are provided with formulas and tasks, requiring them to translate these into MATLAB commands and analyze the resulting outputs.
What topics are discussed in the main body (Chapter 1)?
Chapter 1 covers the Command Window, scalar variable definition, predefined constants like 'pi' and 'inf', arithmetic precedence, and basic operations for managing memory variables.
Which keywords best describe the technical focus of this work?
Key terms include matrix computation, signal representation, visual data plotting (2D/3D), built-in math functions, and specific MATLAB environment management commands.
How should one handle long command lines in the Command Window?
If a command exceeds one line, it can be continued on the following line by typing three periods (...) followed by the Enter key.
How can a user clear variables from the current session?
The 'clear' command is used to remove all variables from memory, while 'clear x y z' targets specific variables for removal.
What is the difference between the 'plot' and 'stem' commands?
The 'plot' command is typically used for continuous data lines, while 'stem' is specifically designed to plot discrete-time sequences.
Are comments allowed in the Command Window?
Yes, any text following the percent symbol (%) on a line is treated as a comment and is ignored during execution.
- Quote paper
- Alan Nebrida (Author), 2022, Matlab. The Language of Technical Computing, Munich, GRIN Verlag, https://www.grin.com/document/1284770