You have a syntax "error" in your if blocks. In octave you don't need to enclose the if "block" in braces. What you're written effectively wraps that assignment inside a 'cell'. And because the 'cell' statement isn't terminated by a semicolon (note that the semicolon is inside the cell!), the resulting cell gets printed on the terminal.
You can just do this instead:
if check > 0
phi2l = phi2r;
endif
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…