hello, Can someone please help write the following algorithm as a Matlab Function for Simulink? i am having trouble with the else statement and time increments. Thanks!
Show older comments

3 Comments
dpb
on 2 Jul 2022
The prepared text/instructioins makes this appear as homework exercise -- it's general practice to coach/answer specific MATLAB Q? for homework, but not to just provide ready-to-run solutions...
So, show us your work so far and ask specifically where you've gotten stuck.
Muhammad Rameez Rashid
on 3 Jul 2022
Muhammad Rameez Rashid
on 3 Jul 2022
Answers (1)
AMIT POTE
on 3 Jul 2022
0 votes
You can go through the following documentation to understand writing if-else statements in MATLAB
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!