Hi,
I have an array1 (4x3x5) of probabilities. I constructed a second array2 corresponding of probabilities to find some values,for each value in array2 I look in the array1 of probabilies at the same index to know the probability to find the value.
Now the problem is that, in array2, some of the values are duplicated. So first I have to remove all the duplicated values, and to recalculate the probabilities of the new unique values by calculating the sum of the probabilities in the second column where the value is the same in array1.
This is all what I find :
uniqueC = unique(C); to calculate the unique elements of the array. I tried to do manipulations like this : n = histc(C(:), uniqueC, 1);
setdiff(C(:), uniqueC);
But it doesn't work with (4x3x5).
I searched for days before I came here.
Please help me, I need it very soon for an assignement.
Best Answer