From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: if statement in if clause
Date: Sat, 09 Oct 2010 16:47:56 -0700
Organization: NNTP Server
Lines: 29
Message-ID: <i8quvd$ph8$>
References: <i8qpon$65s$> <i8qq8f$nh7$> <i8qu5b$940$>
Reply-To: <HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Notice: Filtered by postfilter v. 0.8.2
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100915 Thunderbird/3.1.4
Xref: comp.soft-sys.matlab:677167

On 10/9/2010 4:34 PM, Yayp Rafique wrote:
> Can u clarify a little of what you mean? I am relatively a novice in MATLAB so don't
> really know how to manipulate state machines. Isn't there a simple
 > syntactical solution that can make the code run?

Why everyone seems to top post these days?

ref your question:

I think he said state machine in the programming sense. It is where you 
write down the states that the program can be in at any one time. Then 
you have a specific action to do when in such state, and then transfer 
the state of the program to another state.

it is like a directed graph. nodes are states. When in a node, you 
perform action, then jump to another state. and so on.

Implement as a large case or switch statement. Initialize the program to 
one initial state. There is one end state to terminate.

It just makes complicated logic simpler to program than having to do if 
then else many times and deeply nested.

It has nothing to do with 'matlab'.