title: matlab:switch the hundred-mark system to five-grade marking system
body: <p>switch case problem in matlab<br>
  switch the hundred-mark system to five-grade marking system.  </p>
  
  <pre><code>function f=fjou(x)
  
  switch x
    case x&gt;=90
       f='5';
    case x&gt;=80&amp;x&lt;90
       f='4';
    case x&gt;=70&amp;x&lt;80
       f='3';
    case x&gt;=60&amp;x&lt;70
      f='2';
    otherwise
      f='1';
  end  
  </code></pre>
  
  <p>if the parameter >60, the result is always "1", why?</p>