Hi, I have a struct semanticTrajCompact: after traspose the content in every cell of semanticTrajCompact(1,4).locID, I want to delete consecutive repeated values. I have create this code:
for j=1:size(semanticTrajCompact(1,4).locID,1)y=semanticTrajCompact(1,4).locID{j,1}'newY=y([1,diff(y)]~=0)z(j,1)=newYend
but it gives me this error:
Subscripted assignment dimension mismatch.Error in a (line 4)z(j,1)=newY
I don't understand why, can you help me?
Best Answer