title: Comparing Multiple File Types in an if Statement
body: <p>I am importing a file into a function using <code>[filepath, name, ext]=fileparts(thisFile);</code>. I would then like to use a series of if statements that will operate on the file depending on its type; however, come files will have the same initial set up and so I would like to be able to include them all in an if statement. My current implementation: <code>elseif (ext == '.s3p')</code>. If I put in something like: <code>elseif (ext == '.s2p' || '.s3p')</code> the compiler whines, </p>
  
  <blockquote>
    <p>Operands to the || and &amp;&amp; operators must be convertible to logical scalar values.</p>
  </blockquote>
  
  <p>You see my logic. Is there anything that I can do to make this work?</p>
  
  <p>Thank you in advance!</p>