Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what is equal function ''goto'' in matlab?

Status
Not open for further replies.

m-tlb

Newbie level 6
Joined
Aug 23, 2011
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,366
Hi friends

I write a program with many lines,now i need my program to jump from line 100 to line 150 .so I require "goto" ,but in matlab there isn't this function.my program is too long and so should use minimum numbers of function such as (for ,if, while,...).
may you help me?


thanks so much
 

Can you post or upload your code, so that we can examine it and advise you?

You may possibly benefit from breaking your code down into smaller routines.

BigDog
 

See this .. It may helps you...
**broken link removed**
 

Hi m-tlb,

Really you don't need to use 'goto'. A structured program don't use it. You may write anything in matlab with the other constructions.
Even when the language support goto (like C), it is a good practice to avoid it because breaks the stucture of the program and makes it obscure, hard to understand and debug.
As Dijkstra said: GoTo Statement Considered Harmful.
Regards

Z
 

tanks so much :) ican solve my problom.
 

Sounds like you have it, but "switch-case" statements are ways to do structured "goto" in matlab.
 


Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top