MATLAB Goto Statement
- Downloads:
- Views:
- Rating:

It goes without saying that this code is mainly just for entertainment purposes, since using goto() is considered lazy programming and is a debugging nightmare. With that out of the way, I present to you goto.m, similar to the goto() or jump() commands in other programming disciplines.
Syntax:
goto(pointer,file)
return % All goto() commands need to be followed by a 'return'!
pointer could be an integer representing a line number in the m file, a string addressing a label in the m file, an array consisting of line numbers to consecutively jump to, or a cell array consisting of label strings to jump to. Using inf as an input jumps to the end of the code, while using NaN jumps to a randomly chosen line number (credit to Loren for the not-so-deliberate inspiration).
The second input, file, is optional. It states the code file to which the we want to jump to (default is current m file).
Twenty four example files are accompanied in the zip folder. Check the usage of this function inside them in order to understand how to implement goto() in your own routines. An example is shown below.
Example 23:
labels = {'add';'init1';'add';'add';'show'};
goto(labels)
return
% LABEL init1
a = 0;
goto('End')
return
% LABEL add
a = a + 1;
goto('End')
return
% LABEL init2
a = 0;
goto('End')
return
% LABEL show
msgbox(num2str(a))
% LABEL End
Free download from Shareware Connection - It goes without saying that this code is mainly just for entertainment purposes
Version: 1.0 | Size: 10 KB | Platform: Matlab, Scripts
Released Date: 24-02-2013 | Rating: 0 | Title: MATLAB Goto Statement
Author Url: http://www.mathworks.com
Program Info Url: http://www.mathworks.com
Download Url: http://www.mathworks.com/matlabcentral/fx_files/26949/9/goto.zip
Bezier Curve Plotter GUI - Graphical user interface that allows easy manipulation of Bezier curves by interactively adding
Tetris for Dummies - Tetris game code with sounds, high scores and gravity
Euler/Fixed Angles Properties - Easy to use GUI that gives Euler angles for different rotation matrices and gives rotation matrices for different Euler angles
Simple Fuzzy Control Demonstration - This GUI demonstrates the use of fuzzy logic to control the steering of a car
Bouncing Ball Physics - By using different values for each parameter, the ball's motion changes each time
MATLAB Support Package for Arduino (aka ArduinoIO Package)
SimpleTest
WordPress Auto Poster Plugin
Professional Simulink Audio Equalizer
PHP Print / Echo
Ends Smart Form
Output buffering, and how it can change your life
ScriptCase - PHP Code Generator
Advanced Istaller for Java
Wind Turbine Model
C to C++ Converter
C++ Compiler
Cumulative Mann-Kendall trend test
FORMfields - The PHP Framework
Affiliate Programs
Animation
Auctions
Audio Systems
Banner Rotation
Blog
Bulletin Boards & Forums
Business & Enterprise
Buttons
Calendars & Events
Charts & Graphs
Chat
Classified Ad Managers
Communication
Matlab Pls Data
Statement Of Account
Statement Of Work
Billing Statement Free
Invoice Statement
Open WebMail for Email System Utilities - Open WebMail is designed to manage very large mail folder files in a memory efficient way.
MP3WRITE and MP3READ - Includes 2 functions to write and read MP3 files. It works like the commands WAVWRITE and WAVREAD.
minitools - Minitools present a set of GUI-based programs for routine MatLab operations with current directories, M-Files and MAT-Files.
htmltool - The HTML Toolbox (HT) stores various crosslink information about MATLAB programs using the HyperText Markup Language (HTML).
Classic (Pre-R2008b) Default Desktop Layout - In MATLABâ„¢ 7.7 the default layout was changed
Shareware Connection periodically updates pricing and software information of 'MATLAB Goto Statement' from company source 'Husam Aldahiyat' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using 'MATLAB Goto Statement' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of MATLAB Goto Statement.
Safe In Cloud - It is quite difficult to find any computer users nowadays who do not need to use the web, for any purpose. Whether it is for education or entertainment, the web is your best resource. You also need to use various online services for banking, ...
Zoolz - No serious PC user needs introduction about the need to backup data, both at home and workplace. There was a time when majority of people used external HDD or storage media to backup important data. However, local data backup has its limitations ...
Viper Antivirus - Even a few years back, PC users had very few choices when it came to picking up an antivirus. Over the years, malware and rogue app development has reached new heights, resulting in emergence of several new PC security firms in the arena. Vipre ...
MagiX Video Pro - For PC users, there is no shortage of software to edit video. However, not all video editors come with the required features and versatility to edit complex projects and deal with several gigabytes of HD content easily. The high end video editors ...
Adobe SpeedGrade - Adobe has been a long time player in video editing and post production sector, with apps like Premier Pro and AfterEffects winning accolades and keeping customers hooked for several years. To cater to a niche section of the target users, it has ...
Avid Media Composer - When it comes to professional level video editing, there are plenty of tools available for computer users nowadays. While a lot of studio professionals swear by apps like Adobe’s powerhouse software Premiere Pro and Mac users stick to Final ...
PureSync Personal - When you use computers, there is no way you can escape using specialized third party software. These need to be used for various needs including office productivity, web access, taking back-up and ensuring proper synchronization across multiple ...
Argente - Registry Cleaner - Keeping the Windows registry clean and optimized is essential for getting optimum performance from the PC. While most users do not prefer tinkering with registry settings, it may get laden with erroneous and invalid entries over prolonged usage. ...
SyncMate - Just like windows users, Macintosh users also need to sync their data with myriads of other devices and other Macs. It is possible to use Apple’s much touted iCloud to sync a Mac with other iOS based devices but that may not fit ...
Perfect Photo Suite Premium Edition - For comprehensive image editing and web designing, millions of professionals use Adobe’s powerhouse and industry leading app, namely Photoshop. While Photoshop continues to be the darling of millions for advanced image retouching and ...

