I need to take in the vector A, and automatically split it up, based on a number around 60-62, without knowing how many groups I want to form.
I have a length vector:
A = [4.4708 10.6795 16.9590 23.8035 30.6478 36.2647 40.7722 43.1111 45.6896 51.9593 60.6814 66.8974 73.1607 79.9436 86.7766 92.3354 96.8187 99.1592 101.5261 107.7138 115.3084 121.4887 127.7691 134.6187 141.4633 147.0742 151.5830 153.9290 156.2800 162.4587 168.5842 174.7650 181.0298 187.8266 194.6664 200.1939 204.6659 207.0010 209.3573 215.5136]
Elements in A are in meters.
Now I have broken it up by using the following command:
v=min(A):61:max(A);
and gives the following output:
ans =
4.4708 65.4708 126.4708 187.4708
Which is close but not exact. First is it possible?
The elements that I am looking for are:
4.4708 60.6814 115.3084 168.5842
I would need to do something similiar to another vector:
1.0222 8.2938 17.3975 26.5394 37.4131 48.7097 51.4079 61.0677 67.3565 76.1626 85.4651 94.6554 105.5474 116.9902 119.6214 129.4068 133.8319 141.0227 150.2807 159.4565 170.3328 181.7071 184.2469 193.9713 197.6725 204.9526 214.0602 223.1639 233.9971 245.3746 247.9699 257.6174 260.9988 268.4480 277.6225 286.7506 297.5619 308.9268 311.5883 321.1841 328.9418 337.9682 347.0968 356.2223 367.0407 378.4586 381.1692 390.4907
With an output of:
1.0222 61.0677 133.8319 204.9526 268.4480 347.0968
But using the command I mentioned would give:
v =
Columns 1 through 6 1.0222 62.0222 123.0222 184.0222 245.0222 306.0222Column 7367.0222
Best Answer