필터 지우기
필터 지우기

what is matrix3d?

조회 수: 2 (최근 30일)
Sandhiya Prakash
Sandhiya Prakash 2017년 3월 15일
댓글: Walter Roberson 2017년 3월 15일
my code is neighbors = matrix3d(i-1:i+1, j-1:j+1, k-1:k+1);
It gives error like,
Undefined function or variable 'matrix3d'.

채택된 답변

KSSV
KSSV 2017년 3월 15일
matrix3D is the variable 3D matrix you have. You have not defined it.
matrix3d = rand(10,10,10) ;
% say i = 1, j = 1
i = 2 ; j=3, k = 2
neighbors = matrix3d(i-1:i+1, j-1:j+1, k-1:k+1)
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 3월 15일
Right. This appears to refer back to https://www.mathworks.com/matlabcentral/answers/310452-how-can-i-find-26-neighbors-of-point-with-coordinates-of-i-j-k#answer_241820 where matrix3d was simply the name of the variable that Image Analyst used to represent the your 3D data set.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by