Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!news.ecp.fr!aioe.org!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: if statement in if clause
Date: Sat, 09 Oct 2010 16:47:56 -0700
Organization: Aioe.org NNTP Server
Lines: 29
Message-ID: <i8quvd$ph8$1@speranza.aioe.org>
References: <i8qpon$65s$1@fred.mathworks.com> <i8qq8f$nh7$1@news.eternal-september.org> <i8qu5b$940$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: tUYQ4Ty9mMw9Pdc8TJRFQA.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
X-Notice: Filtered by postfilter v. 0.8.2
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4
Xref: news.mathworks.com 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'.

--Nasser