Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

multiply matrices and sum the result

조회 수: 2 (최근 30일)
tevzia
tevzia 2013년 12월 3일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi,
I want to multiply two different matrices and sum the result It is a neighborhood analysis.for matrix x every row is an area and every column is an action occurs (for area 1, action is at period 4). so area 1 and 3 happens at the same time. if area 1 and 3 are neighbor it should be multiply (at least i think multiplying would give the result) and results will be 1 or 0 if they are not neighbour and sum ( basically count how many of them are neighbor and action occurs same period. for matrix y each column and row is area if they are neighbor it's 1 otherwise 0.
Here is my matrices:
x=[0 0 0 1
1 0 0 0
0 0 0 1
0 1 0 0
0 0 1 0]
y=[0 0 0 0 0
1 0 0 0 0
1 1 0 0 0
0 1 0 0 0
0 1 1 1 0]

답변 (1개)

Image Analyst
Image Analyst 2013년 12월 4일
편집: Image Analyst 2013년 12월 4일
I'm not sure what it means to "be neighbors". Does that mean a 1 in row "r" can have neighbors only if they occur in row "r-1" or "r+1"? It's also not clear to me how y was created and why it has 5 columns instead of 4. Can you go through how that was constructed?

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by