Well the error is pretty obvious. The following lines is using parenthesis incorrectly:
data.Q02=str2double(((datastr(75:80))/10000)) - data.Q0;
data.Qx2=str2double(((datastr(81:86))/10000)) - data.Qx;
data.Qy2=str2double(((datastr(87:92))/10000)) - data.Qy;
data.Qz2=str2double(((datastr(93:98))/10000)) - data.Qz;
data.Tx2=str2double(((datastr(99:105))/100)) - data.Tx;
data.Ty2=str2double(((datastr(106:112))/100)) - data.Ty;
data.Tz2=str2double(((datastr(113:119))/100)) - data.Ty;
You want to place your parenthesis so str2double operates only on the datastr() and not the divide by.
data.Q02=str2double(datastr(75:80))/10000 - data.Q0;
data.Qx2=str2double(datastr(81:86))/10000 - data.Qx;
data.Qy2=str2double(datastr(87:92))/10000 - data.Qy;
data.Qz2=str2double(datastr(93:98))/10000 - data.Qz;
data.Tx2=str2double(datastr(99:105))/100 - data.Tx;
data.Ty2=str2double(datastr(106:112))/100 - data.Ty;
data.Tz2=str2double(datastr(113:119))/100 - data.Ty;
HTH
Best Answer