I have a very simple code as following
for i=1:100
datafiles{i}= load(sprintf('%d.mat', i));
for k=1:611
bond_vec(k,:)=datafiles{i}(1).xyz(k+1,:) – datafiles{i}(1).xyz(k,:);
end
bond_vectors{i}=(bond_vec);
end
yet it gives error as if sizes do not compare. I can't see what the problem is can anyone help? thanks
Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 1-by-3.
Best Answer