필터 지우기
필터 지우기

how can i get the x coordinate from a matrix???

조회 수: 3 (최근 30일)
Usama Javed
Usama Javed 2012년 5월 5일
I have 3*3 A matrix and i want only the x coordinate of A(2,1). how can i do that
  댓글 수: 1
Aidin
Aidin 2012년 5월 5일
Can you give an example for how you want to use this? It seems to me that the x and y coordinates are always known and hence there shouldnt be a problem.

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

답변 (1개)

Aidin
Aidin 2012년 5월 5일
I am not sure I know how you want to use it but I imagine you can do something like this:
x = input('Give x coordinate: ')
y = input('Give y coordinate: ')
disp(['the x coordinate is', num2str(x)])
Basically, what I mean is I cant see a case where you get an x coordinate and y coordinate without knowing the value, and therefor you can always save the x coordinate in a variable x and use it when you want.

Community Treasure Hunt

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

Start Hunting!

Translated by