Path: news.mathworks.com!not-for-mail
From: "Marios Karaoulis" <marios_hellas_23@yahoo.gr>
Newsgroups: comp.soft-sys.matlab
Subject: Re: vectorize this
Date: Wed, 7 Mar 2012 00:02:24 +0000 (UTC)
Organization: Colorado School of Mines
Lines: 12
Message-ID: <jj68ig$l1u$1@newscl01ah.mathworks.com>
References: <da1f7113-a999-4cb6-a905-8a0cae39138f@p13g2000yqd.googlegroups.com> <jj60p4$pon$1@newscl01ah.mathworks.com>
Reply-To: "Marios Karaoulis" <marios_hellas_23@yahoo.gr>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1331078544 21566 172.30.248.35 (7 Mar 2012 00:02:24 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 7 Mar 2012 00:02:24 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 574495
Xref: news.mathworks.com comp.soft-sys.matlab:760131


>   You are using A, B, M, and N as row indices in Jx, Jy, and Jz which each have only 225 rows.  Yet 'randi' can generate integers as high as 1890 (= 'num_mes') for these four variables.  How do you avoid getting an error message about that (not to mention possibly meaningless results?)
> 
> Roger Stafford


None of the data I have are random. I just created some random matrices for you to understand the problem. 
You are right thuoght, ind_data should be like this

ind_data = randi([1:num_param],num_mess,4);

Sorry about that.