I am simplifying coordinates, MwCoords. The left column is the x values and the right column is y values. I do not want to alter the postition of the x or y values.
MwCoords = 241.5493 360.1065 241.7508 251.1975 246.9076 148.8279 350.6785 144.9718 349.2095 255.6598 352.6571 364.5513 456.4168 149.5675 459.3270 256.3704 460.4547 360.4354
I have been using mink to find the three minimum values in the x and maxk to find the 3 max values in the x
MwCoordsMins = mink(MwCoords(:,1),3)MwCoordsMaxs = maxk(MwCoords(:,1),3)
This outputs
MwCoordsMins = 241.5493 241.7508 246.9076 MwCoordsMaxs = 460.4547 459.3270 456.4168
I need to put 1's in the mins, and 3's in the max of the origional MwCoords
From there I need to assign the 3 middle values to 2's
Then I need to plug it back into the origional matrix without disrupting the positioning of these. The postitioning will change every now and then, thats why it has to be in the same place.
After I figure out the x values, I move on to the y values.
If anyone can help, or offer insight that would be great!
Edit – Whatever I added, I put it in bold
Best Answer