Input function, MATLAB Programming

Input Function:

The Input statements read in values from the default or standard input device. In most of the systems, the default input device is the keyboard; therefore the input statement reads values which have been entered by the user, or by the person who is running the script. To let the user know what he or she is assumed to enter, the script should first prompt the user for the specified values.

The simplest input function in a MATLAB is known as input. The input function is used in the assignment statement. To call it, the string is passed, that is a prompt which will emerge on the screen, and what the user types will be stored in the variable named on the left of the assignment statement. To make it simpler to read the prompt, place a colon and then a space after the prompt. 

 

Posted Date: 10/18/2012 5:46:15 AM | Location : United States







Related Discussions:- Input function, Assignment Help, Ask Question on Input function, Get Answer, Expert's Help, Input function Discussions

Write discussion on Input function
Your posts are moderated
Related Questions
How can I separate a row vector into groups.

Expand a matrix: To expand a matrix, an individual element could not be added as that would mean there would no longer be the similar number of values in every row. Though,


Damped free vibrations can be modelled by considering a block of mass m that is attached to a spring and a dashpot as shown. From Newton's second law of motion, the displac

Input in a for Loop: The script below repeats the process of prompting the user for a number, and echo printing the number (that means simply printing it back out). A for loop

Write a Matlab function that computes y1= tan(x) and y2= sin(x)/cos(x), returns the difference |y1-y2| and prints a message whether the two are equal or not. Test your function for


Problem 1. Create a vector representing x coordinates of a measurement with 20 points between 0 and 10. Create another vector y representing fake measurements which are related to

Implement a MatLab function to calculate y.  The function should take two input arguments 1) A vector of parameters In the above example this would be of length 3, the first

how to model a diode in matlab given data