To display a variable in Matlab, you can simply type the name of the variable in the command window and press Enter. For example, if you have a variable x
, you can display its value by typing x
in the command window and pressing Enter:
main.m38 chars8 lines
Alternatively, you can also use the disp
function to display the variable:
main.m28 chars4 lines
This will display the value of the variable x
in the command window.
gistlibby LogSnag