How to split an array into two using while loop?
Alright so I have a data set that when graphed produces 2 peaks or are two distributions..
i want to split the graph in two...
for example if the data set is
set= [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]
and i want to spit it into two vectors.. say till element 13.. so that the split looks like this
set1 = [1,2,3,4,5,6,7,8,9,10,11,12,13]
and
set2 = [14,15,16,17,18,19,20,21,22,23,24,25]
will a while loop work for this? or is there a better method
i tried with while loop but the syntax i used just sums up till element 13. 😕
update:
k so just thinking out loud here but shouldnt the following just simply split the vector:
set[0;set[d
where d is set to the mid point (13th value)
i tried that but it only gives me the value at 0.. that is set[0
