CSE 7 Lecture Notes - Lecture 14: Short Circuit, Error Function, Boolean Expression
Document Summary
Loops: while loop while this condition is true, the loop continues, while () statement(s) end, ex: age=input( enter age:") while age < 0 age= input( invalid! Enter a positive number:") end for loop (counted loop) Clicker: given this function: none= n function[none] = toofun(n) end. Which is the matching function call: answer is : num= toofun(3) and toofun(4, whatfun(20) function whatfun(n) if n < 21 display ( study matlab") end. 1. this displays study matlab : what gets printed? j=1 while j< 5 disp(j) j=j+2 end, this displays: 1. 3: throwing an error this is a built in error function it displays the error message in red. 1. this would create window with the options of sin, cos, and tan: is functions return boolean. 3. returns 1 or 0 for every character in the string returns 1 or 0 depending on if the string is a key word isletter(string) 1: ex: isletter(2fun) 0 1 1 1 iskeyword(string)