[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Min function problem
From: |
plamen |
Subject: |
Min function problem |
Date: |
Sat, 11 Jan 2014 18:51:25 -0800 (PST) |
Hello,
I am having the following problem
for j1=1:length(index1)
for j2=1:length(index2)
B(j1,j2)=abs(f(index1(j1))-f(index2(j2)));
end
[minB(j1), iminB(j1)]=min(B(j1,:));
if (minB(j1)<=some_value)
C(index2(iminB(j1)),j)=A(index2(iminB(j1)),j);
and when I run the script I am getting an error message A(I): index out of
bounds; value 2 out of bound 1
on the line where I call index(iminB(j1))
How is that possible, whereas the values of iminB are chosen between the
index of index2?
Thanks for your advice
Plamen
--
View this message in context:
http://octave.1599824.n4.nabble.com/Min-function-problem-tp4660968.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Min function problem,
plamen <=