I was doing a model for a slider-crank mechanism and I wanted to display an error for when the crank's length exceeds that of the slider arm. With the crank's length as r2 and the slider's as r3, my code went like this:
if r3=<r2
error('The crank's length cannot exceed that of the slider')
end
I get the error:
??? error('The crank's length cannot exceed that of the slider')
|
Error: Unexpected MATLAB expression.
can someone tell me what I'm doing wrong and how to fix it please?