필터 지우기
필터 지우기

how to combine the coordinates of points of 2 column vectors for specific width

조회 수: 2 (최근 30일)
M.S. Khan
M.S. Khan 2019년 6월 13일
댓글: Guillaume 2019년 6월 17일
Thanks for community support. let me phrase my questions with more detail lets suppose i have vertices of a tea cup.
Vx =[ 0;1;2;0;9]
Vy = [1;1;,2;;3]
Vz= = [38,32,-1]
They are cancatenated in a larger matrix = [Vx Vy Vz].
After sorting, i want to find first elements or coordinates like (0,1,38) here in Vx,Vy,Vz wherever they meet or match, it should be labelled as 5 in that particular grid.
Your guidance will be highly appreciated.
regards
  댓글 수: 2
dpb
dpb 2019년 6월 13일
편집: dpb 2019년 6월 14일
"They are cancatenated in a larger matrix = [Vx Vy Vz]."
No they aren't -- can't be because
size(Vx) --> 5,1
size(Vy) --> 4,1
size(Vz) --> 1,3
so never shall they match w/o help...
M.S. Khan
M.S. Khan 2019년 6월 13일
okay. lets Vx, Vy and Vz are same size. then how can we extract the first coordinates of all three vectors to make a point and label it as 5

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

답변 (1개)

madhan ravi
madhan ravi 2019년 6월 13일
matrix(1,:) % extracted the first coordinate , however I don’t know what you mean by label them as five perhaps text() is what you’re looking for??
  댓글 수: 12
M.S. Khan
M.S. Khan 2019년 6월 17일
Mr. Ravi, i am still struggling with it but trying to utilize reshape function on my problem. lets me figure out but still very confusiong problem to handle it.
Guillaume
Guillaume 2019년 6월 17일
i am still struggling with it
If, instead of answering my question by another question, you'd actually answered it, we probably could have figured what it is you want. So once again, given the inputs:
Vx = [0 0 0 0 0 3 3 3 3 3 6 6 6 6 6 9 9 9 9 9 11 11 11 11 11]
Vy = [0 3 6 9 11 0 3 6 9 11 0 3 6 9 11 0 3 6 9 11 0 3 6 9 11]
width = 5
What do you want as output. Use valid matlab syntax to fill the following:
result = ????

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by