Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assign onList with 1 if guestName is included on guestList. Otherwise, assign onList with 0. Note: The isempty(A) function returns a logical 1 (true) if
Assign onList with 1 if guestName is included on guestList. Otherwise, assign onList with 0. Note: The isempty(A) function returns a logical 1 (true) if array A is empty and logical 0 (false) otherwise Ex: If guestName is Benjamin' and guestList is Harold Delphia Benjamin Lovie Ena', then onList is 1 Your Function Save C ResetE MATLAB Documentation 1 function onList FindGuest (guestName, guestList) 2 onList=0; 3 end Code to call your function C Reset FindGuest( 'Benjamin', 'Harold Delphia Benjamin Lovie Ena') Run Function Output Assessment Submit FindGuest('BenjaminHarold Delphia Benjamin Lovie Ena') returns 1 FindGuest('MadelineHarold Delphia Benjamin Lovie Ena) returns 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started