MATLAB for Engineers - Introduction to while Loops (Part 2 of 4): Updating Variables and Counters

  Рет қаралды 18,908

Spartan Professor

Spartan Professor

3 жыл бұрын

In this video, I introduce you to updating the value of a scalar variable and using a counter variable inside of a while loop. To explain this concept, we will take a look at an example problem where we determine how long it will take to double an initial account balance based on a specified annual rate of return. First, we'll take a look at the problem statement. Then, I'll walk you through a flow chart of the problem to visualize the use of a counter variable. Finally, we'll solve the problem in MATLAB.
A while loop is a loop structure for repeating a calculation until a specified condition is met. While loops are present in most programming languages and environments.
This is Part 2 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 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 -...
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.

Пікірлер: 22
@nathanturner5972
@nathanturner5972 2 ай бұрын
Understood this concept in 2 min compared to how my professor teaches. Thank you
@dwikyabdullah-qm4nc
@dwikyabdullah-qm4nc Ай бұрын
hello, I'm from Indonesia. and your channel is really helpful for finding a detailed explanation of Matlab. your explanation is also easy to understand, I hope you can upload again some videos related to Matlab. thank you, professor,
@EngineeringwithDrKelseyJoy
@EngineeringwithDrKelseyJoy 2 жыл бұрын
Love the flowchart and code visual highlighting the process! Very cool!
@humaismuhammad55
@humaismuhammad55 3 жыл бұрын
Your videos are fantastic and easy to understand. I am watching it a day before my exam 😂❤
@sheikhaalfuqaei9161
@sheikhaalfuqaei9161 3 жыл бұрын
Great explanation, Thank you so much.
@SpartanProfessor
@SpartanProfessor 2 жыл бұрын
Glad it was helpful!
@geraldfokumla2877
@geraldfokumla2877 2 жыл бұрын
Outstanding explanation. Very easy to understand. Thanks a lot
@ggo.o9666
@ggo.o9666 2 жыл бұрын
this is so helpful thank you very much
@gizemkacann
@gizemkacann 5 ай бұрын
many thankss wonderfull explanation!!
@solomononuchefaruna5022
@solomononuchefaruna5022 2 жыл бұрын
Thanks for your comprehensive style of delivering lectures. Even the dumbest student can understand your lectures. I am a PhD student at ITB Bandung Indonesia and am trying to implement my algorithm using recursive least squares. Could you please make a video on this subject with practical example. Most videos I have seen doesn't give comprehensive explanation and examples.
@jescarchambeshi
@jescarchambeshi 2 ай бұрын
Thank you very much, you saved me😩💝💝
@rivers3408
@rivers3408 7 ай бұрын
Im learning!!!
@oa213
@oa213 2 жыл бұрын
Thank you :)
@omkarkudalkar4621
@omkarkudalkar4621 3 жыл бұрын
thankss
@joeyroberts9443
@joeyroberts9443 8 ай бұрын
ur so clutch
@ravindrakhakural6757
@ravindrakhakural6757 Жыл бұрын
Great Explanation Professor , Lets buy some beers :)
@user-ri2kn4hy7y
@user-ri2kn4hy7y 5 ай бұрын
hey, amazing videos! I have a somewhat unrelated question. say I wanted the balance to display as 20122 dollars rather than in scientific notation. how would I do that? Also, I have some output in the format "0.37154A(5.438715e-01" what does that represent?
@SpartanProfessor
@SpartanProfessor 4 ай бұрын
The quickest way to display the output as a currency would be to use the format bank command. Otherwise, you could use the fprintf function.
@kevaldevkar751
@kevaldevkar751 2 жыл бұрын
I know it is a silly question but why have you add 1 in the statements??
@obaidrehman773
@obaidrehman773 Жыл бұрын
So that at the end the value of year will tell you how much years have passed to reach that condition
@aaronpicking4935
@aaronpicking4935 Жыл бұрын
Tau beta pi!
@samterrell3265
@samterrell3265 3 ай бұрын
Good explanation just stop being such a robot 😭
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 108 МЛН
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 5 МЛН
The Algorithm Behind Spell Checkers
13:02
b001
Рет қаралды 407 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 523 М.
MATLAB for Engineers - Conditional Statements if, else, and elseif
12:52
Spartan Professor
Рет қаралды 76 М.
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 325 М.
Why I Chose Rust Over Zig
33:18
ThePrimeTime
Рет қаралды 25 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 386 М.