필터 지우기
필터 지우기

I can't understand a piece of code

조회 수: 2 (최근 30일)
Arn Raj
Arn Raj 2017년 8월 23일
댓글: Jan 2017년 8월 23일
I am extremely new to Matlab and I can't understand a basic thing I guess. I downloaded an available code of a basic active contour model(snake) and in the function, I don't understand what variable P is. Can anybody explain for me?
  댓글 수: 1
Jan
Jan 2017년 8월 23일
Please post code as text, and not as screen shot. This is easier to read and much easier for copy&paste. Posting the GUI code attachment does not concern the problem. Please do not post code from the FileExchange without a link and the required license file.

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

채택된 답변

Reen
Reen 2017년 8월 23일
It looks like P is a matrix that stores the x and y coordinates of the snake contour at N different points. The matrix has N rows, (so N different x and y values) and 2 columns (first is x position, second is y position). If you had the P matrix and wanted to look at the first set of coordinates, you could access them by typing:
P(1,:); % This means: P(first row, every entry) and we would get [x1 y1] as an answer
  댓글 수: 1
Arn Raj
Arn Raj 2017년 8월 23일
@Reen Thanks a lot for your help.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by