From: BHARATH on 24 Feb 2010 01:40 hi.. i have matrix and i have to index, if i select 2 column, it has to display column no. let A be a matrix , after multiplying with permutation matrix for interchange of columns i want to how in the original matrix which columns have been changed and their order..... please help me in indexing this one
From: Oleg Komarov on 24 Feb 2010 04:15 "BHARATH " <bhushabhusha(a)gmail.com> wrote in message <hm2hko$t06$1(a)fred.mathworks.com>... > hi.. > > i have matrix and i have to index, if i select 2 column, it has to display column no. > > let A be a matrix , > > after multiplying with permutation matrix for interchange of columns i want to how in the original matrix which columns have been changed and their order..... > > please help me in indexing this one Please re-state your query with proper english syntax, otherwise it's really hard to interpret your need. Also, if it's possible, add a brief example of the input and the desired output. Oleg
From: BHARATH on 25 Feb 2010 00:32 "Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <hm2qmq$1q7$1(a)fred.mathworks.com>... > "BHARATH " <bhushabhusha(a)gmail.com> wrote in message <hm2hko$t06$1(a)fred.mathworks.com>... > > hi.. > > > > i have matrix and i have to index, if i select 2 column, it has to display column no. > > > > let A be a matrix , > > > > after multiplying with permutation matrix for interchange of columns i want to how in the original matrix which columns have been changed and their order..... > > > > please help me in indexing this one > > Please re-state your query with proper english syntax, otherwise it's really hard to interpret your need. > > Also, if it's possible, add a brief example of the input and the desired output. > > hi sorry, i wil restate the problem, Let A be a matrix A=[1 2 3 4 5 6 7 8 9] after multiplying by permutation matrix, say P for column interchange, i get B matrix as B= A*P let it have B as B= [2 1 3 5 4 6 8 7 9] here i have to now which columns have been interchanged from A in their position ie., here 2 1 3. i need it for a large matrix. here if i call the index as 1 in B , i have to get the second column of B matrix... please help me here
From: Rune Allnor on 25 Feb 2010 01:57 On 25 Feb, 06:32, "BHARATH " <bhushabhu...(a)gmail.com> wrote: > "Oleg Komarov" <oleg.komarovRemove.t...(a)hotmail.it> wrote in message <hm2qmq$1q...(a)fred.mathworks.com>... > > "BHARATH " <bhushabhu...(a)gmail.com> wrote in message <hm2hko$t0...(a)fred..mathworks.com>... > > > hi.. > > > > i have matrix and i have to index, if i select 2 column, it has to display column no. > > > > let A be a matrix , > > > > after multiplying with permutation matrix for interchange of columns i want to how in the original matrix which columns have been changed and their order..... > > > > please help me in indexing this one > > > Please re-state your query with proper english syntax, otherwise it's really hard to interpret your need. > > > Also, if it's possible, add a brief example of the input and the desired output. > > hi sorry, > > i wil restate the problem, > > Let A be a matrix > > A=[1 2 3 > 4 5 6 > 7 8 9] > > after multiplying by permutation matrix, say P for column interchange, i get B matrix as > > B= A*P > > let it have B as > > B= [2 1 3 > 5 4 6 > 8 7 9] > > here i have to now which columns have been interchanged from A in their position ie., here 2 1 3. ....down to here, the post sounds like a run-of-the-mill homework assignment... > i need it for a large matrix. ....while this does not. If you want this for real, the most efficient way to swap columns is this: B=A; B(:,1)=A(:,2); B(:,2)=A(:,1); No need for a matrix multiplication, which would require far more space and take a lot longer. And of course, if this was an attempt to obfuscate a homework assigment, you still have to look up your own textbooks yourself. Rune
From: BHARATH on 26 Feb 2010 00:28
thanks sir, thats ok.. i have that idea for swaaping in small matrix and we know which colunms are chamging... In my work i dont know about the swapping that is which columns change..... here column change is done QR rank revealing Factorization... matrix dimension is 28,000*220 i need indexong for this one |