Dears I have to change only in range (1->nnn=30) of field MPPosC (4 values each), i will chose maximum to make the change on it, the field MPPosC is belong the structure QC that has hhh=140 of MPPosC.
cptx=1
nnn=length(TT);
for hhh=1:length(QC)
if(cptx<=nnn)
maxim=max( QC(hhh).MPPosC);
idx=find(QC(hhh).MPPosC==maxim);
QC(hhh).MPPosC(idx)=function(QC(hhh).MPPosC(idx),bin2dec(TT(cptx)));
cptx=cptx+1;
%disp('inloop');
end
end
When i run the code error appearing Subscripted assignment between dissimilar structures. please do you have an alternative solution ???
Dears I have to change only in range (1->nnn=30) of field MPPosC (4 values each), i will chose maximum to make the change on it, the field MPPosC is belong the structure QC that has hhh=140 of MPPosC.
cptx=1 nnn=length(TT); for hhh=1:length(QC) if(cptx<=nnn) maxim=max( QC(hhh).MPPosC); idx=find(QC(hhh).MPPosC==maxim); QC(hhh).MPPosC(idx)=function(QC(hhh).MPPosC(idx),bin2dec(TT(cptx))); cptx=cptx+1; %disp('inloop'); end end
When i run the code error appearing Subscripted assignment between dissimilar structures. please do you have an alternative solution ???