Hi, I have the following code, in which there is a matrix b, I want to plot the even index values against odd index values once I have done a conversion to 8-bit signed equivalent:
MATLAB gives me an unbalanced or unexpected parentheses or bracket error and I fail to understand why, as I don't see any error in my code, please help, below is my code:
i=1;for i=1:1000if i%2~=0
if b[i]>127 %b is a two dimensional matrix of dimensions 1000 * 1
b[i]=b[i]-256; x[i]=b[i]; else x[i]=b[i]; endelse if b[i]>127 b[i]=b[i]-256; y[i]=b[i]; else y[i]=b[i]; endendi=i+1;end i=1for i=1:10000plot (x[i],y[i]);end
I get the error at line 5, i.e.
b[i]=b[i]-256;
Best Answer