Hi, I have an N row, single column cell array 'Chn', with each row having different size. Chn is defiend for instance as follows
Chn = {[4,4,3];[2,2,3,3,3];[4,5,2,4,2];[2,3,5,1];1;[4,3];[5,3,2];[3,2,4,5,1];[3,5,1,1];[1,2]};
I also have a vector 'Asg' with its entry ranging between the min. and max. of each rows of 'Chn'. For example, Asg can be defined as
Asg = [3,1];
I want to obtain another cell array, which returns logical results in the rows of Chn for each entry contained in Asg. For the example above, I looking to get the following output;
Res = {[0,0,1]} {[0,0,1,1,1]} {[0,0,0,0,0]} {[0,1,0,1]} {1} {[0,1]} {[0,1,0]} {[1,0,0,0,1]} {[1,0,1,1]} {[1,0]}
Please, what is a clean way to achieve this?
Best Answer