Question: why fprintf is used in matlab?
Answer: The fprintf function is used for printing information to the screen. The fprintf function prints an array of characters to the screen: fprintf('Happy Birthday\n'); We often use the fprintf statement to show the user information stored in our variables.