I have a large matrix with values of "period" p – I am testing this part of my code where I find what row p belongs to in order to access the corresponding row later in my code. However for some reason this will only run three times (so until cct=3) before i get the error: Assignment has more non-singleton rhs dimensions than non-singleton subscripts; error position1(cct,1)=find(p==pp)
*p=AAA(1:end-1,1); %%%returns 10000x1 matrix of values 0 to 1 in 0.001 steps
cct=1;for pp =0.1:0.1:0.5; position1(cct,1)=find(p==pp); position2=position1(cct,1); valuep=p(position2,1); %%%to check it is the correct value
cct=cct+1;end*
Best Answer