MATLAB for Engineers - Introduction to while Loops (Part 3 of 4): Indexing and Storage in Arrays

  Рет қаралды 16,127

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'll use a while loop to determine how long it will take to double an initial account balance based on a specified annual rate of return. Unlike in Part 2 (link below), we'll store the account balance inside of an array using an index variable. First, we'll take a look at the problem statement. Then, I'll walk you through a flow chart to visualize how to store the end-of-year balance in a specific element in an array through the use of an index variable. Finally, we'll solve the problem in MATLAB. While loops are present in most programming languages and environments.
This is Part 3 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 4 introduces the concept of combing loops and logic by nesting an if statement inside of a while loop. Link to Part 4: • 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.

Пікірлер: 11
@danielsoria5334
@danielsoria5334 3 жыл бұрын
Thanks for the such a good explanation!!
@kapilsahu4031
@kapilsahu4031 3 жыл бұрын
PLEAR SIR UPLOAD NEXT WHILE LOOP VIDEO 4/4, it's really helpful sir
@thaibinhnguyenthi6807
@thaibinhnguyenthi6807 2 жыл бұрын
Thank u so much, this lesson is great!
@omarel-ghezawi6466
@omarel-ghezawi6466 Жыл бұрын
Excellent!
@Abid-qp2jm
@Abid-qp2jm Жыл бұрын
thank u
@Paull520
@Paull520 2 жыл бұрын
can you explain how to make for loop into a while loop
@jacobhouston1655
@jacobhouston1655 3 жыл бұрын
I don't understand this i array concept. Need a visual to explain that, please.
@mlcambre3
@mlcambre3 3 жыл бұрын
Where is the fourth video?
@kapilsahu8090
@kapilsahu8090 3 жыл бұрын
PLEAR SIR UPLOAD NEXT WHILE LOOP VIDEO
@angie25601
@angie25601 3 жыл бұрын
I will look forward to watch the video 4/4 !!! Many thanks for sharing your knowledge in an understandable way
@jacobhouston1655
@jacobhouston1655 3 жыл бұрын
@@SpartanProfessor It's not on this playlist, sir.
MATLAB for Engineers - Preallocation of Variables: What, Why, and How
17:01
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 25 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 114 МЛН
MATLAB: Inputs and Outputs (fprintf)  for Beginners
7:11
Engineering with Dr. Kelsey Joy
Рет қаралды 3,4 М.
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 325 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 911 М.
Nested Loop in MATLAB | Easy Example to Understand Nested Loops (4K UHD)
10:52
The Algorithm Behind Spell Checkers
13:02
b001
Рет қаралды 407 М.