Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Database Workbench Pro 5.5.0
Luxand FaceSDK 7.0
SSIS Data Flow Components 1.10
Entity Developer Professional 6.3
dbForge Index Manager for SQL Server 1.9
dbForge Data Generator For MySQL 2.2
Magento Australia Post eParcel Extension 1.0
Airbnb Script - Airbnb Clone 1.0.3
Hotel Restaurant Reviews and Feedback Script 1.0.3
Documenter for MySQL 1.0
ODBC Driver for xBase 1.1
ODBC Driver for FreshBooks 2.0
AnyGantt JS Gantt Charts 8.4.2
The C# Barcode Library 4.0.2.2
ConyEdit for Windows 1.1.0
Top Code
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Database Workbench Pro 5.5.0
PHP MLM Software 2.0.1
Billing System 1.0.1
SCHOOL MANAGEMENT SOFTWARE 1.2
WordStat 2.0
Sportsbook software by BOOKIE Software 3.01
Faculty Evaluation System 1.1
Shopping System for Shopping Carts 1.1
Light PHP Content Management System for Scripts 2.0.2p1
WhatsApp Clone Script - BlaberChat 1.0
MLM Software ONE 1.5.46
Stani's Python Editor 1.0
Hotel Management - Full Board Version 6.55
SSH Tunnel Client 3.0
Top Rated
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.0
WeBuilder 2015 13.3
PHP Digital Download Script 1.0.4
MATLAB Goto Statement 1.0
File ID: 84340






MATLAB Goto Statement 1.0
Download MATLAB Goto Statement 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 4
Submit Rating:
MATLAB Goto Statement 1.0 Description
Description: 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

License: Shareware

Related: current, default, twenty, Folder, accompanied, Files, States, optional

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 4



More Similar Code

A function to write PiCTeX "plot" format files.

This function writes the "plot" statement needed to generate a plot of X vs. Y into a given filename.

Tested under MATLAB 5.x



GOTO filename changes MATLAB current directory to the one containing filename. filename must be on the MATLAB path. goto uses the first instance of filename that it finds (a la WHICH).

This is not rocket science, but it sure is convenient!



Statement: strLetterCounter('string')
....where, 'string' is an input string containing alphabet or numbers.

Ex: string='aaaaaaaabbbbbbccd'
Statement: strLetterCounter(string)
Output: '8a,6b,2c,1d'

Note: This...



A function-decorator that provides the goto command.



This code, when passed a MATLAB structure, will recursively go into it and print out the form of the struct.



Using information from Matlab central, Robot Grrl, and the Arduino forums, four files (two .m and two sketches) demonstrate two way communications between Matlab and the Arduino. The first set of files, serialTest1, demonstrates arduino input with...



VIDEO TUTORIAL: Serial communication (TX and RX) using SERIAL Matlab function. For Bluetooth and RS-232 devices applications. (Narration in Spanish).



If you need to access a remote machine from your Matlab session (for near-real time data transfer etc...) this set of functions allows you to programmatically send a single command and obtain the return values as a cell array.

Added...



This file is for begainers, who wanted to learn the MATLAB in short duration of time.



The attached zip file contains the slides, MATLAB M-files, and Simulink models that were used in the Fixed-Point Programming in MATLAB webinar from December 8, 2005 by Tom Bryan. The recorded webinar is linked off of the Fixed-Point Toolbox web page

User Review for MATLAB Goto Statement
- required fields
     

Please enter text on the image