Input in a for loop, MATLAB Programming

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 identifies how many times this is to take place. This is the other example in which the loop variable is not used in the action, but rather just identifies how many times to repeat the action.

756_input a for loop.png

205_input a for loop1.png

Posted Date: 10/19/2012 3:42:28 AM | Location : United States







Related Discussions:- Input in a for loop, Assignment Help, Ask Question on Input in a for loop, Get Answer, Expert's Help, Input in a for loop Discussions

Write discussion on Input in a for loop
Your posts are moderated
Related Questions

Your task is to implement the PHYSAT algorithm in Matlab to classify the phytoplankton species in the data you have selected. An algorithm demonstrating one solution is provided b

The Switch Statement: A switch statement can frequently used in place of a nested if-else or an if statement with numerous else if clauses. The Switch statements are used when


How do you write a programme that asks the user for a number between 1 and 1000 and calculates the sum of its digits?

Write a MATLAB function called pgm which calculates the periodogram. The function inputs should be the length input vector x and its output should be the length N periodogram estim

Matrices of random numbers: The Matrices of random numbers can be generated using the rand and randint functions. The first two arguments in the randint function identify the

Type logical: The type logical is used to store the true/false values. If any variables have been formed in the Command Window, they can be seen at the Workspace Window. In

Illustration of Output statements: For illustration, >> disp('Hello') Hello >> disp(4^3)   64 The formatted output can be printed to the screen by using the fpr