Asked by Mohammad Shafiq Khan
on 13 Jun 2019

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

Answer by madhan ravi
on 13 Jun 2019

madhan ravi
on 16 Jun 2019 at 5:27

xy =[Vx;Vy]; % you haven’t responded to Guillaume’s question still!

width=5;

reshape(xy,size(xy,2),[],width)

Mohammad Shafiq Khan
on 17 Jun 2019 at 7:58

Guillaume
on 17 Jun 2019 at 9:15

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 = ????

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 2 Comments

## dpb (view profile)

Direct link to this comment:https://in.mathworks.com/matlabcentral/answers/466829-how-to-combine-the-coordinates-of-points-of-2-column-vectors-for-specific-width#comment_714224

## Mohammad Shafiq Khan (view profile)

Direct link to this comment:https://in.mathworks.com/matlabcentral/answers/466829-how-to-combine-the-coordinates-of-points-of-2-column-vectors-for-specific-width#comment_714228

Sign in to comment.