Question: Solve in Matlab 2. Greeting string Write a function with the first line function G myGreeting (name, age) where name is a string and age
2. Greeting string Write a function with the first line function G myGreeting (name, age) where name is a string and age is a double, and G is the string 'Hi, my name is--and i am- years old." Use the sprintf comm integer. Assume that name is a string and age is an integer. Test Cases: >gi-greet ('Tim',26) and, and note that %s is the format code for a string and %d for an Hi, my name is Tim and I am 26 years old. >> g2 greet ( Rose , , 19) Hi, my name is Rose and I am 19 years old
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
