Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
1 view (last 30 days)
Show older comments
I have this code (data attached) and i receive this error: "Unable to perform assignment because the indices on the left side are not compatible with the size of the right side". I tougth the problem was related to NaN and i also tried to remove them (third rows of the code) but it still give me this error.
Can someone help me?
load ('sclerometrica_equotip_v1')
misure = [ID_stop L Nn Bn];
% misure(any(isnan(misure), 2), :) = [];
ID_stop1 = misure(:,1);
L1 = misure(:,2);
Nn1 = misure(:,3);
Bn1 = misure(:,4);
k = unique(ID_stop1);
for i = 1:numel(k)
index = (ID_stop1 == k(i));
N= Nn1(index); %battute nodi
j = unique(N);
for m = 1:numel(j)
index2 = (N == j(m));
L_nodo = L1(index2);
end
end
3 Comments
See Also
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!