Stuart’s MATLAB Videos

Watch and Learn

Understand If statement behavior on vectors

In teaching new MATLAB users, I often see them accidentally use a vector as an input to an if statement. This is not likely what they intend and it is often an overlooked syntax error. In this video, I show the error as it is often coded and a simple example showing the outcomes of different vectors.

|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.