How to form Adjacency matrix from CXX and CYY where CXX and CYY contains collectively some information??

조회 수: 6 (최근 30일)
Hi, I have 100 x 100 binary image, I have made 2 x 2 grid on it, within each grid I am taking centre-of-mass of the white pixels if they have any white pixels else represent the grid as NaN.x-coordinate mean in CXX and Y coordinate mean in CYY.. To get a grph I am plotting :-
plot(CYY,CXX,'k*');
But I need Adjacency Matrix of a graph..How can I get that.....
  댓글 수: 1
Jan
Jan 2018년 2월 25일
I cannot follow your descriptions. Please post an example input and the code. "I have mad a grid" can mean a variety of procedures. What does "represent the grid as NaN" mean? With some code it would be clear, what you are doing. But is the explanation needed at all? Maybe it is enough to state, that you have two vectors X and Y which contain coordinates and want the corresponding adjacency matrix? Does it matter, where the coordinates are coming from or that they are called "CXX"?

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2018년 2월 25일
As posted in your other thread already, the methods shown here should solve your problem:
You have commented: "No help". So please explain, why these methods do not help you. What is the difference between these solutions and what you need?
  댓글 수: 12
Mohammad Bhat
Mohammad Bhat 2018년 2월 25일
Sir, I went thru your suggestion,since I am new to this forum,I will not repreat mistakes,I got the desired Adjacency matrix,.....Thank you all for patience and tolerance....
Jan
Jan 2018년 2월 25일
@Mohammad: You are welcome. The purpose of this forum is solving Matlab problem and this includes finding out, what the actual problems are.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by