On Thu, Aug 1, 2019 at 2:18 PM gigiolone123 <

[hidden email]> wrote:

>

> hi,

> i look your site but i don't understand how can i do it..

>

> i give you another example:

>

> a = 1 3 4..

> 4 2 1..

> 2 4 5..

> .. . ..

>

> I have several pairs of rows and columns

>

> b : 1 3 ......(row)

> c: 2 3 ......(colum)

>

> d=zeros(size(a));

>

> for i=1:length(x)

> d(b(x),c(x))= a(b(x),c(x))

> endfor

>

> it's possible to do it avoid loop?

>

> thank

>

>

You can convert your original matrix into vector aa= a(:); do find thing

and then recover the aa vector and then reshape() it back to original

matrix.

Dmitri.

--