From: alfann on
where are you????
waiting for you.
Please help me...
From: Walter Roberson on
alfann wrote:
> where are you????
> waiting for you.
> Please help me...

Who is "you" in this matter? If you are referring to Oleg, he is in Italy,
where it is presently just a few minutes short of 11 pm on a Friday night.
Were you expecting Oleg to put aside his Friday evening plans in order to
assist you? If so, does he know that?


With regards to the islands program: did you read the example given in the
source code?
From: alfann on
Dear members,
I downloaded the file, then I added its path to the matlab path.
Then, I copy this code
___________
[a,b] = islands(U1);
b(b(:,end) ~= 1,:) = [];
a(~ismember(a,b(:,1))) = 0;
___________

and run it and then print U1
and showd me U1 without any calculations.

Please...help me how can I do it
because my project needs to be ready this week by solve this problem.
Sorry if I bother you but because ny knowledg about the matlab is not like you here...
Your level is too good.
Please help me to run the code with this matrix:
U1=[20 33 50 20 10 80 10; 10 1 85 88 90 10 90; 60 1 20 33 21 21 30; 50 05 50 44 50 50 10; 80 50 50 10 1 1 1; 20 0 50 60 1 10 50; 10 50 30 50 50 10 90; 80 20 10 70 80 50 30; 40 50 30 80 20 10 20]



wiating for you.
From: alfann on
Re: Need helps for some work in matrix
Posted: Jun 6, 2010 2:02 PM Plain Text Reply


Dear members,
I downloaded the file, then I added its path to the matlab path.
Then, I copy this code
___________
[a,b] = islands(U1);
b(b(:,end) ~= 1,:) = [];
a(~ismember(a,b(:,1))) = 0;
___________

and run it and then print U1
and showd me U1 without any calculations.

Please...help me how can I do it
because my project needs to be ready this week by solve this problem.
Sorry if I bother you but because ny knowledg about the matlab is not like you here...
Your level is too good.
Please help me to run the code with this matrix:
U1=[20 33 50 20 10 80 10; 10 1 85 88 90 10 90; 60 1 20 33 21 21 30; 50 05 50 44 50 50 10; 80 50 50 10 1 1 1; 20 0 50 60 1 10 50; 10 50 30 50 50 10 90; 80 20 10 70 80 50 30; 40 50 30 80 20 10 20]



wiating for you.

Please...
From: alfann on
Hi
I will explain what I got and did:
I entered this matrix:
U1=[20 33 50 20 10 80 10; 10 1 85 88 90 10 90; 60 1 20 33 21 21 30; 50 05 50 44 50 50 10; 80 50 50 10 1 1 1; 20 0 50 60 1 10 50; 10 50 30 50 50 10 90; 80 20 10 70 80 50 30; 40 50 30 80 20 10 20]
______
then
I used this term:
[a,b] = islands(U1)

and it showed me this result:
a =

0 0 0 0 0 0 0
0 1 0 0 0 0 0
0 1 0 0 2 2 0
0 0 4 0 3 3 0
0 4 4 0 5 5 5
0 0 4 0 5 7 0
0 0 0 6 6 7 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

b =

1 2 1
2 2 21
3 2 50
4 4 50
5 4 1
6 2 50
7 2 10

__________
then:
I printed:
b(b(:,end) ~= 1,:) = []

and the reults:
b =

1 2 1
5 4 1
which means the chains of ones are two and it is true.
________________

Then I printed:
a(~ismember(a,b(:,1))) = 0
which set all other numbers out of the chain equal to 0 zero.
a =

0 0 0 0 0 0 0
0 1 0 0 0 0 0
0 1 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 5 5 5
0 0 0 0 5 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0







My question is:
How can tell the program set all the two chains ones (1) no (1 and 5)?

and


How can I calculate the average for each chain?


Please help me....