help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Min function problem


From: Kai Torben Ohlhus
Subject: Re: Min function problem
Date: Sun, 12 Jan 2014 13:15:41 +0100

On Sun, Jan 12, 2014 at 3:51 AM, plamen <address@hidden> wrote:
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.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave

Hello Plamen,

can you provide a minimal and executable code sample (with e.g. your input data, as I have no clue about the dimensions of these values).

Best,
Kai

reply via email to

[Prev in Thread] Current Thread [Next in Thread]