MATLAB code needed

Job ID: 30951913

Budget: €8 – €30 EUR

Hello! I would need a piece of Matlab code.
The code is constituted by 3 aspects:



1) I have data in a struct (I am sending an example of the data I have), and within the struct there are doubles with different lengths. In this case, some doubles are (24x1), others are (26x1). I need the code to identify the smaller length of the doubles within the struct (in this case identify the 24), and trim the others that are bigger (in this case the doubles that are 26 - but may vary) removing the last elements of the double turning then equal to the smaller struct (in this case turn the 26 double to 24 double as well).

2) Following, I need the code to identify for each double within the array, if and where it starts repeating the elements until the end of the double. For example, in this case, the first double within the struct is a 26x1. Removing the last elements to match the smaller double, it will become a 24x1. Then, the elements within the double are "1" from position 1 to 13, and after it is "2" from 14 to 24. So, What would be needed is to return a TRUE (there is repeated elements for at least i=(last element) to i = ((last element)-1) and identify the position in which the repetition starts (in this case 14).

3) After that, from 1 to (last element of the doubles that at this point must all be the same size - in this case 24), I would need to create histograms of how many times does the element in position i = 1 to (last element) repeat within the whole struct, and which element is it. For example, for i = 1 : 24, how many of the positions 1 within the 252 doubles have the values are 1, 2, or 3. So it would be a 3D histogram, in which one axis would correspond to the element within the double (1 : 24 in this case), one axis would be the double values ( 1 : 3 in this case) and the last axis would be the count of the elements for the position that have those values.


Please only contact me if you can do all of them and deliver today or within 24h.