Tech Fixx · Video

MATLAB Switch Statements: case, otherwise & Multiple Choices | Lesson 18

Watch this 2 min 9 sec video from the Tech Fixx channel, published .

Check that the device, software and version shown match your setup. Use the player controls for captions, playback speed and full screen where available.

Loading the player connects to YouTube. If playback is unavailable here, watch on YouTube ↗.

Captions and text transcripts

After loading the player, use its CC control to turn on captions when available. To look for a text transcript, use the Watch on YouTube link above, expand the video description and select “Show transcript” if offered.

Caption and transcript availability varies by video, and automatic captions may contain mistakes. The original channel description is separate from a transcript. Caption accuracy, audio description and text alternatives have not been verified for every video in this library.

From the video description

Original channel description, recorded . Product, software and service references in it may have changed since publication.

Learn MATLAB switch statements for choosing one block of code from several known cases. This beginner Lesson 18 covers switch, case and otherwise syntax, grouped cases, practical menu logic and when if-elseif is the better option.

You’ll learn how to: • Write a switch block • Match values with case clauses • Add a fallback with otherwise • Group several values in one case • Build simple menu and mode-selection logic • Compare switch with if-elseif-else • Avoid common matching mistakes

Chapters: 0:00 Introduction 0:25 Switch statement syntax 0:55 case and otherwise 1:20 Group multiple conditions 1:45 Practical examples 2:00 Summary

Official MathWorks documentation: https://www.mathworks.com/help/matlab/ref/switch.html

Continue the full MATLAB for Beginners course on Tech-Fix and subscribe for more step-by-step programming tutorials.

#MATLAB #SwitchStatement #ControlFlow

How it works · DEX

Find, save and shop

Explore offers, save a shortlist and buy with the retailer.

More help and things to check

Confirm current prices and offer terms with the retailer. Device saves start in this browser. Account sync is optional.

Shopping tools & alerts
Household calendarYour For You findsWatch a priceAdd to Home Screen

Choose your deal alerts

Get selected updates about offers you save. You choose whether to enable notifications on this device.