Ask Experts Questions for FREE Help !
Ask
    dks2114's Avatar
    dks2114 Posts: 32, Reputation: 2
    Junior Member
     
    #1

    Oct 12, 2007, 04:20 PM
    Matlab 'goto' statements
    Okay, so I have previous knowledge of Visual basic and Q-basic and well in these programs if I wanted to go to a certain line I would write 'goto 1' or 'goto line 1' etc. Does anyone know the notation for such a move in Matlab (if this is a legal move in Matlab)?
    anandji's Avatar
    anandji Posts: 2, Reputation: 1
    New Member
     
    #2

    Feb 20, 2008, 09:15 PM
    Quote Originally Posted by dks2114
    Okay, so I have previous knowledge of Visual basic and Q-basic and well in these programs if I wanted to go to a certain line i would write 'goto 1' or 'goto line 1' etc. Does anyone know the notation for such a move in Matlab (if this is a legal move in Matlab)?
    Bhvghcv
    anandji's Avatar
    anandji Posts: 2, Reputation: 1
    New Member
     
    #3

    Feb 20, 2008, 09:15 PM
    Fhfghgfhgfhj sdfgdfh d
    fwety's Avatar
    fwety Posts: 3, Reputation: 1
    New Member
     
    #4

    Feb 20, 2011, 11:55 PM
    MATLAB does not support the use of go to statements on the rationale that it promotes poor programming practice. I suggest writing your code to work with for,while,if-elseif, or switch/case.
    If you're dead set on using go to statements, then you could write your code in FORTRAN (use global variables for scope purposes), and then 'mex' it into MATLAB (using the mex command).

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search


Check out some similar questions!

Iris recognition with Matlab [ 4 Answers ]

I got error in line 42 =fileattrib(savefile); in createiristemplate.m. I'm using MATLAB 7.1. I also don't understand these code: savefile = ; =fileattrib(savefile); Is 'houghpara.mat' an attrib? anyone can help me to understand, what does this code segment is done?

Recursive Matlab problem [ 2 Answers ]

Hi, I'm trying to write a matlab program for a recursive sequence. I worked out the sequence right I think but can't get the figures right in the program. Here's the program I have so far: %recursive program for water %dam cycling down to empty Clear Format long A=32; Fprintf(' Week ...


View more questions Search