Simple Input/Output Program in MATLAB Last Updated : 20 Aug, 2020 Improve Improve Like Article Like Save Share Report Let us see how to input and output data in MATLAB. input() Syntax : input(PROMPT, “s”) Parameters : PROMPT : text prompted “s” : optional, to input a string Returns : the data entered The input() function is used to input data in MATLAB. Example : % entering an integer input("Enter an integer : ") % entering a string input("Enter a string : ", "s") Output : Enter an integer : 10 ans = 10 Enter a string : GeeksforGeeks ans = GeeksforGeeks display() Syntax : display(OBJ) Parameters : OBJ : the object to be displayed Returns : Nothing The display() function is used to output data in MATLAB. Example : % output a string display("GeeksforGeeks") % output a variable var = 10; display(var) Output : GeeksforGeeks var = 10 Like Article Suggest improvement Next Spectrogram in MATLAB Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Simple GUI Calculator in MATLAB Create a Simple App Using GUIDE in MATLAB Program to find simple moving average Menu Driven C++ Program for a Simple Calculator Program to find simple moving average | Set-2 Program to evaluate simple expressions Program to find simple interest JavaScript Program to find simple interest Matlab program to rotate an image 180 degrees clockwise without using function Longest Monotonically Increasing Subsequence Size (N log N): Simple implementation Like S sk7004019618 Follow Article Tags : MATLAB Competitive Programming Computer Subject DSA MATLAB