Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Its a matlab question Function Name: functiony Inputs: 1. (char) A string containing a function header Outputs: 1. (logical) A logical indicating whether or not
Its a matlab question
Function Name: functiony Inputs: 1. (char) A string containing a function header Outputs: 1. (logical) A logical indicating whether or not the function header is valid Background: You're studying for finals and have finished all the practice tests, but GT Wi-Fi goes down before you can check your answers! To check to see whether all your function headers are valid, you decide to write a function in MATLAB. Afterall, MATLAB will always be there for you when GT inevitably fails you again. Function Description: Write a function that takes in a string containing a function header and outputs a true or a false indicating whether the header is valid. Example [out] functiony('function [out] myFunction(in)') out = true Hints: Using several conditionals will be easier than one long conditional. Think of a way to keep track of if one rule fails through a variable or a vector of variables. Create a helper function to check for valid variable names. The functions strtrim() and iskeyword() will be very useful. Function Name: functiony Inputs: 1. (char) A string containing a function header Outputs: 1. (logical) A logical indicating whether or not the function header is valid Background: You're studying for finals and have finished all the practice tests, but GT Wi-Fi goes down before you can check your answers! To check to see whether all your function headers are valid, you decide to write a function in MATLAB. Afterall, MATLAB will always be there for you when GT inevitably fails you again. Function Description: Write a function that takes in a string containing a function header and outputs a true or a false indicating whether the header is valid. Example [out] functiony('function [out] myFunction(in)') out = true Hints: Using several conditionals will be easier than one long conditional. Think of a way to keep track of if one rule fails through a variable or a vector of variables. Create a helper function to check for valid variable names. The functions strtrim() and iskeyword() will be very usefulStep 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