as we can see there are three 0.3 in set r, and i would like to get the sum value of P ((3+1+2)) where r= 0.3, and the sum value of p ((4+1)) where r=0.8. while for the other P values with the distinctive r value will remain the same.
Nov 14th 2007, 11:47 AM
I am sorry, I am not quite sure I understand- what exactly are youtrying to do?
Are we talking about P or p? What is P? MATLAB distinguishes between lower and upper case, ie. P is NOT the same thing as p. What has p to do with r? Are you trying to sum all the elements of the vector? Or count how many times a specific number occurs?
Nov 14th 2007, 05:41 PM
sorry for the confusion. Actually all are lower case p.
How do i isolate out the above data so that r will only have
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.91 and if the data for
r repeat (for example 0.3, 0.8, 0.9) then i will
have to get the sum of its p data.