
Kirk B. answered 01/17/23
BME PhD candidate with 6+ years MATLAB experience
The error indicates you're collecting the incorrect data type from your input (char) and then using it as an argument for an invalid function. The mistake here is in your print statement; I expect the function you actually wanted was fprintf, like this: