Simple Input/Output Program in MATLAB Last Updated : 20 Aug, 2020 Summarize Comments Improve Suggest changes Share Like Article Like 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 : MATLAB % 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 : MATLAB % output a string display("GeeksforGeeks") % output a variable var = 10; display(var) Output : GeeksforGeeks var = 10 Comment More infoAdvertise with us Next Article Negative of an image in MATLAB S sk7004019618 Follow Improve Article Tags : GBlog MATLAB Similar Reads Object Oriented Programming (OOPs) in MATLAB Object-Oriented Programming (OOPs) in MATLAB is similar to many conventional programming languages like Java, Python, etc except the syntax. The important feature of OOPs is, it enables you to combine data and it's associated actions (methods/functions) into objects. Compared to other languages, suc 6 min read GUI Based Tables in MATLAB GUI tables in MATLAB are graphical user interface that allow users to display and manipulate tabular data.They are used to create interactive applications that require data to be displayed in a table format. GUI tables in MATLAB typically consist of columns and rows , with each column representing a 3 min read 2D Line Plot in MATLAB '2D' stands for 2-dimensional and a 2D line is a line that is moved in 2-dimensions. A line in 2D means that we could move in forward and backward direction but also in any direction like left, right, up, down. In MATLAB we have a function named plot() which allows us to plot a line in 2 directions. 4 min read Installing MATLAB on Linux MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other language 3 min read Negative of an image in MATLAB The negative of an image is achieved by replacing the intensity 'i' in the original image by 'i-1', i.e. the darkest pixels will become the brightest and the brightest pixels will become the darkest. Image negative is produced by subtracting each pixel from the maximum intensity value. For example i 2 min read Get environment variable in MATLAB In this article, we are going to discuss "Getting environment variable", which can be done using getenv() function. The getenv() function is used to get the operating system environment variable. Syntax:value = getenv(name) Parameters: This function accepts a parameter name parameter. name: This is 1 min read Like