Postgres Find Function Matlab Syntax For Logical If Statement