In MATLAB, one function we can use to print information to the Command Window is the 'disp()' function. The 'disp()' function can be used to print strings with variables included. Let's see some examples of this.
matlab
age = 18;
name = "Steve";
disp(age); % output: 18
disp("Hello " + name); % output: "Hello Steve"
disp("Today, " + name + " turned " + age); % output: "Today, Steve turned 18"
As we can see, strings and variables can be added together into one string using the addition (+) operator and then printed to the Command Window using the 'disp()' function.