Assume we have the following data:
H_T = [36 66 21 65 52 67 73; 31 23 19 33 36 39 42]
P = [40 38 39 40 35 32 37]
Using MATLAB 7.0, I want to create new three matrices that have the following properties:
The matrix H
(the first part in matrix H_T
) will be divided to 3 intervals:
- Matrix 1: the 1st interval contains the
H
values between 20 to 40 - Matrix 2: the 2nd interval contains the
H
values between 40 to 60 - Matrix 3: the 3rd interval contains the
H
values between 60 to 80
The important thing is that the corresponding T
and P
will also be included in their new matrices meaning that H
will control the new matrices depending on the specifications defined above.
So, the resultant matrices will be:
H_T_1 = [36 21; 31 19]
P_1 = [40 39]
H_T_2 = [52; 36]
P_2 = [35]
H_T_3 = [66 65 67 73; 23 33 39 42]
P_3 = [38 40 32 37]
Actually, this is a simple example and it is easy by looking to create the new matrices depending on the specifications, BUT in my values I have thousands of numbers which makes it very difficult to do that.
Any help is highly appreciated.