i am having a column vector of length 60000. i have to split it into 10 parts. so it becomes 10 column vectors and i have to use box plot for each column vectors.
i know the box plot function but how do i split my vector?
Your‘redlayer’ vector is(255x1) and your‘redfinal’ matrix is(256x256). That causes a dimension mismatch. One of them has to change dimension by1, and you should be good to go.
The easiest way to do what you want would be to use themat2cell command. For instance, if you wanted to divide it into segments of lengths of [100, 150, 50, 25, 75]:
V = randi(99, 1, 400);
Vs = mat2cell(V, 1, [100, 150, 50, 25, 75]);
Vs4 = Vs{4}; % Addressing Cell #4
Here,‘Vs’ is a(1x5) cell, and‘Vs4’ is a(1x25) double.
Best Answer