I have data of 1891*4. In first row I have degree from 0 to 60 which has repetation of degree and I want to add all the same degree values which are in column 3 and add for column 4too. How can I do it?
if you load the data we are getting shc_06 and shc_12. Please find the attachment of code but I dont know how to calculate of same number degree in column1 have to added in column 3 and 4 respectively. So i will get 60*1 as output because the in column one we are having range from 0 to 60.
load('aiub_shc.mat')
k=1;
j=1;
del_cl_06 = shc06(:,3);
del_sl_06 = shc06(:,4);
del_cl_12 = shc12(:,3);
del_sl_12 = shc12(:,4);
for i=1:1:size(shc06)
if all(shc06(j,1))
std_cl_06(j,k)= del_cl_06(i,k)^2+del_sl_06(i,k)^2;
std_cl_12(j,k)= del_cl_12(i,k)^2+del_sl_12(i,k)^2;
j=j+1;
else
i=i+1;
end
end