Hi,
I have 2 differnt csv files, i want to append the columns from book8 to book 7 based on the name column that appears in the 2 files, the name in 7 are unique but in 8 there are duplicates, so the appending columns may differ from row to another ...
is there a way to add the corresponding columns to a specific row?
i tried to append the columns in differnt ways with no success...
[M_obs,text_obs,obs]=xlsread('book7.csv');
[M_pri,text_pri,pri]=xlsread('book8.csv');
[r,c]=size(obs);
[new_matrix]=deal({});
new_matrix=obs;
for row=(2:r)
z=find(strcmp(pri(row,1),obs(:,1)))
new_matrix(row,:)=pri(z,3:end);
end
0 Comments
Sign in to comment.