Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
column vector selector

Subject: column vector selector

From: Artur Racu

Date: 12 May, 2010 07:08:03

Message: 1 of 6

hello everybody,

who can help me to solve this problem, i have a triangular matrix there the upper part is non-zero values, the lower is zero, i made a column vector composed of 3 columns, 1-row position from triangular matrix, 2-column position and 3-value, the values means the coherent coefficient between position row and column,
example
1,2-0.56
1,3-0.25
2,3-0.89
2,5-0.25
and so one

starting with the first elements, 1 and 2 are coherent so make the first group GEN A 1,2 (value is not important now for me, i need just the elements) next step check in the list if there are other elements coherent with 1
ex 1,3 , ok if 3 is coherent with all other elements from GEN A leave it in this group if not make a new group (in this case 2 is coherent with 3 so it means is coherent with one)

thank you,

Artur

Subject: column vector selector

From: Oleg Komarov

Date: 12 May, 2010 07:34:19

Message: 2 of 6

"Artur Racu" <arturracu@yahoo.com> wrote in message <hsdk4j$b33$1@fred.mathworks.com>...
> hello everybody,
>
> who can help me to solve this problem, i have a triangular matrix there the upper part is non-zero values, the lower is zero, i made a column vector composed of 3 columns, 1-row position from triangular matrix, 2-column position and 3-value, the values means the coherent coefficient between position row and column,
> example
> 1,2-0.56
> 1,3-0.25
> 2,3-0.89
> 2,5-0.25
> and so one
>
> starting with the first elements, 1 and 2 are coherent so make the first group GEN A 1,2 (value is not important now for me, i need just the elements) next step check in the list if there are other elements coherent with 1
> ex 1,3 , ok if 3 is coherent with all other elements from GEN A leave it in this group if not make a new group (in this case 2 is coherent with 3 so it means is coherent with one)
>
> thank you,
>
> Artur

I don't understand what you mean by coherent...

Oleg

Subject: column vector selector

From: us

Date: 12 May, 2010 07:50:05

Message: 3 of 6

"Artur Racu" <arturracu@yahoo.com> wrote in message <hsdk4j$b33$1@fred.mathworks.com>...
> hello everybody,
>
> who can help me to solve this problem, i have a triangular matrix there the upper part is non-zero values, the lower is zero, i made a column vector composed of 3 columns, 1-row position from triangular matrix, 2-column position and 3-value, the values means the coherent coefficient between position row and column,
> example
> 1,2-0.56
> 1,3-0.25
> 2,3-0.89
> 2,5-0.25
> and so one
>
> starting with the first elements, 1 and 2 are coherent so make the first group GEN A 1,2 (value is not important now for me, i need just the elements) next step check in the list if there are other elements coherent with 1
> ex 1,3 , ok if 3 is coherent with all other elements from GEN A leave it in this group if not make a new group (in this case 2 is coherent with 3 so it means is coherent with one)
>
> thank you,
>
> Artur

incoherent verbosity rather than a clear, copy/paste-able example of an input/result...

us

Subject: column vector selector

From: Artur Racu

Date: 12 May, 2010 11:22:04

Message: 4 of 6

"Oleg Komarov" <oleg.komarovRemove.this@hotmail.it> wrote in message <hsdllr$a9l$1@fred.mathworks.com>...
> "Artur Racu" <arturracu@yahoo.com> wrote in message <hsdk4j$b33$1@fred.mathworks.com>...
> > hello everybody,
> >
> > who can help me to solve this problem, i have a triangular matrix there the upper part is non-zero values, the lower is zero, i made a column vector composed of 3 columns, 1-row position from triangular matrix, 2-column position and 3-value, the values means the coherent coefficient between position row and column,
> > example
> > 1,2-0.56
> > 1,3-0.25
> > 2,3-0.89
> > 2,5-0.25
> > and so one
> >
> > starting with the first elements, 1 and 2 are coherent so make the first group GEN A 1,2 (value is not important now for me, i need just the elements) next step check in the list if there are other elements coherent with 1
> > ex 1,3 , ok if 3 is coherent with all other elements from GEN A leave it in this group if not make a new group (in this case 2 is coherent with 3 so it means is coherent with one)
> >
> > thank you,
> >
> > Artur
>
> I don't understand what you mean by coherent...
>
> Oleg
So, I have a triangular matrix where the upper part is non zero elements A=(n x n) the number of elements in the upper part of the triu matrix is n(n-1)/2, by coherent I mean that that value is a link between the row and column position(my case on position a12 that value is the difference of generators speed between the generator number 1 and generator number 2, a56 diff between gen 5 and gen 6 and so one), so I need to extract and sort in ascend mode this value after that I will stabilize a threshold and all the values above that threshold will mean that those generators are coherent between them, the main condition is that generators from one group should be coherent all of them between them, example

Name GEN i Name GEN j coherent indeces

2 3 0,0000060000 Cij min
1 3 0,0000770000
1 2 0,0000830000
2 4 0,0000840000
3 4 0,0000900000
1 4 0,0001670000 0,0001574
4 5 0,0005960000
2 5 0,0006800000
3 5 0,0006860000
1 5 0,0007630000 Cij max

Threshold is 0.0001574

I need to make an equivalent of generators which are coherent, so as you see in this table 2,3 will be in the first group next I have a link between 1 and 2 1 and 3 so it means it is coherent and I will put him in the same group 1,2,3 next I see that I have 4 coherent with 2 and 3 but not with 1 which is below the threshold so it means I will make a new group and so one…my matrix is 1000 x 1000


Thank you, sorry for my bad English
Artur

Subject: column vector selector

From: Oleg Komarov

Date: 12 May, 2010 13:24:04

Message: 5 of 6

> Name GEN i Name GEN j coherent indeces
>
> 2 3 0,0000060000 Cij min
> 1 3 0,0000770000
> 1 2 0,0000830000
> 2 4 0,0000840000
> 3 4 0,0000900000
> 1 4 0,0001670000 0,0001574
> 4 5 0,0005960000
> 2 5 0,0006800000
> 3 5 0,0006860000
> 1 5 0,0007630000 Cij max
>
> Threshold is 0.0001574
> Thank you, sorry for my bad English
> Artur

Still not clear but i reproduced something similar:
% Create an upper triangular matrix
In = triu(rand(4)*0.01);
% Find row and col positions
[row, col, v] = find(In);
% Sort in by ascending value
sortrows([row, col, v],3)
ans =
            3 4 0.0010022
            1 2 0.0011816
            1 1 0.0017711
            4 4 0.0017812
            2 3 0.0028785
            3 3 0.0041452
            1 4 0.0076396
            2 4 0.008182
            2 2 0.0098842
            1 3 0.0099949

Then what do you need to do next?
Oleg

Subject: column vector selector

From: Artur Racu

Date: 12 May, 2010 13:40:22

Message: 6 of 6

"Oleg Komarov" <oleg.komarovRemove.this@hotmail.it> wrote in message <hsea5k$a08$1@fred.mathworks.com>...
> > Name GEN i Name GEN j coherent indeces
> >
> > 2 3 0,0000060000 Cij min
> > 1 3 0,0000770000
> > 1 2 0,0000830000
> > 2 4 0,0000840000
> > 3 4 0,0000900000
> > 1 4 0,0001670000 0,0001574
> > 4 5 0,0005960000
> > 2 5 0,0006800000
> > 3 5 0,0006860000
> > 1 5 0,0007630000 Cij max
> >
> > Threshold is 0.0001574
> > Thank you, sorry for my bad English
> > Artur
>
> Still not clear but i reproduced something similar:
> % Create an upper triangular matrix
> In = triu(rand(4)*0.01);
> % Find row and col positions
> [row, col, v] = find(In);
> % Sort in by ascending value
> sortrows([row, col, v],3)
> ans =
> 3 4 0.0010022
> 1 2 0.0011816
> 1 1 0.0017711
> 4 4 0.0017812
> 2 3 0.0028785
> 3 3 0.0041452
> 1 4 0.0076396
> 2 4 0.008182
> 2 2 0.0098842
> 1 3 0.0099949
>
> Then what do you need to do next?
> Oleg
Thank you for this commands, this step I already did, so now I need to find the maximal cliques between this elements(between rows and columns) so I can have complete sub graphs (each elements should be connect to each other) in this way I will have groups of elements that have a direct strong connection between them,

Thank you one more time,
Artur

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us