title: How can I display an error message in MATLAB?
body: <p>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 <code>r2</code> and the slider's as <code>r3</code>, my code went like this:</p>
  
  <pre><code>if r3=&lt;r2
      error('The crank's length cannot exceed that of the slider')
  end
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>???     error('The crank's length cannot exceed that of the slider')
                           |
  Error: Unexpected MATLAB expression.
  </code></pre>
  
  <p>can someone tell me what I'm doing wrong and how to fix it please?</p>