The first line (where you renamed scrib to scribe)
val=scribe>0.99
creates a binary/logical variable called val that is true/1 for any element in scrib (or scribe) that is greater than 0.99, and false/0 for any element that is 0.99 or less.
The second line
map=(scrib<0.01)+val;
first creates a temporary binary/logical array where it's true for any element where scrib is less than 0.99. Then, because it's using + instead of &, it casts val to double, then casts the temporary logical variable to double, then adds them together to form a new double variable called map. Most good MATLAB programmers would have done it this way instead:
map = (scrib<0.01) & val;
so map would have been a logical variable also.
The third line :
feature=[reshape(im,m*n,d)';[a;b]/sqrt(m*m+n*n)*level+rand(2,m*n)*1e-6];
creates an array by concatenating vertically two other arrays. The first part, reshape(im,m*n,d), takes all the pixels in the image and puts them into a column vector. If the image is color, you will have the green and blue channels in columns 2 and 3 respectively. Then it transposes it so they are in row vectors. Then it concatenates a scaled version of the badly named a and b underneath that.
The reason it's hard to follow is that this is poorly written code. It's an alphabet soup mess of a code with no comments, variable names that are single letters with no clue as to what they mean, describe, or represent, and use variable names (like "now") that destroy built-in functions. Don't be like this programmer. Instead, read this link and be better than them.