Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news1.google.com!news.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: fckool <xtrangekid@sapo.pt>
Newsgroups: comp.soft-sys.matlab
Subject: Re: optimize code
Date: Thu, 13 May 2010 15:29:43 EDT
Organization: The Math Forum
Lines: 7
Message-ID: <557270125.131391.1273779013572.JavaMail.root@gallium.mathforum.org>
References: <281772826.131070.1273774288131.JavaMail.root@gallium.mathforum.org>
NNTP-Posting-Host: gallium.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1273779013 23336 144.118.94.39 (13 May 2010 19:30:13 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Thu, 13 May 2010 19:30:13 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:635559

forget it... your code is correct because when you remove the corresponding value on occur vetor you automatically have the correct value on the Prob vector. 

I have other question.. (sorry)

I have a for cycle where a enter 2 values manually de Simbs and their Probably .. I want do a condition that don't let me introduce a value bigger than 1 like its Sum. when it happens I want the user introduce again the value..

it's possible?