No video

MATLAB for Engineers - Introduction to while Loops (Part 4 of 4): Combining Loops and Logic

  Рет қаралды 13,055

Spartan Professor

Spartan Professor

Күн бұрын

A while loop is a loop structure for repeating a calculation when the number of loop passes is not known in advance. In this video, we will combine loops and logic by nesting the conditional statement if (if-then) inside of a while loop to determine the maximum height of a projectile. I'll also introduce you to the break command which can be used to terminate a loop early without ending the program. First, I'll introduce you to the problem. Then, we'll walk through a flow chart to demonstrate how the conditional statements dictate the path that the program takes. Finally, we'll solve the problem in the MATLAB programming environment.
If you are unfamiliar with while loops and how they can be used to perform scalar operations, I'd recommend watching Parts 1 and 2 of the series. If you are unfamiliar with working with arrays or array indexing inside of a while loop then I would recommend checking out Part 3. Links to Parts 1 through 3 can be found below.
This is Part 4 of a 4 Part Series on while Loops.
Part 1 introduces the basic structure of a while loop and demonstrates a loop pass. Link to Part 1: • MATLAB for Engineers -...
Part 2 expands upon the concept of updating the value of a scalar loop variable with each loop pass. Link to Part 2: • MATLAB for Engineers -...
Part 3 introduces the concept of storing the value of a loop variable inside of an array using an index variable. Link to Part 3: • MATLAB for Engineers -...
The background music in the intro and outro was written and produced by Michael J Calamas for the exclusive use of David Calamas.

Пікірлер: 12
MATLAB for Engineers - Conditional Statements if, else, and elseif
12:52
Spartan Professor
Рет қаралды 76 М.
Oh No! My Doll Fell In The Dirt🤧💩
00:17
ToolTastic
Рет қаралды 8 МЛН
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 10 МЛН
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 37 МЛН
MATLAB for Engineers - Preallocation of Variables: What, Why, and How
17:01
2D Plotting in Matlab
25:08
Christopher Lum
Рет қаралды 167 М.
Relational Operators in MATLAB: Comparing Arrays with Examples
6:39
Spartan Professor
Рет қаралды 1,3 М.
Working with Matrices in Matlab
31:03
Christopher Lum
Рет қаралды 126 М.
Oh No! My Doll Fell In The Dirt🤧💩
00:17
ToolTastic
Рет қаралды 8 МЛН