Algorithm for subfunction, MATLAB in Engineering

Algorithm for subfunction:

The algorithm for subfunction askforn is as shown:

  •  Prompt the user for the positive integer n.
  •  Loop to print an error message and reprompt awaiting the user enters a positive integer.
  •  Return the positive integer n.

 

Posted Date: 10/19/2012 8:33:59 AM | Location : United States







Related Discussions:- Algorithm for subfunction, Assignment Help, Ask Question on Algorithm for subfunction, Get Answer, Expert's Help, Algorithm for subfunction Discussions

Write discussion on Algorithm for subfunction
Your posts are moderated
Related Questions
Function cirarea - Anonymous functions: The function handle name is cirarea. The one argument is passed to the input argument radius. The body of the function is an expression

Logical scalar values: The MATLAB also has or and and operators which work element wise for the matrices: These operators will compare any of the two vectors or matric

Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,

Creating the structure Variables: Creating a structure variable can be accomplished by simply storing the values in fields by using assignment statements, or by using the stru

Splits a string : The strtok function splits a string into pieces; it can be called in many ways. The function receives one string as an input argument. It appears for the fir


Help command: The help command is used with the script rectarea, the function readlenwid, and the major function printrectarea. To see the first comment in the subfunction, as

Example of Interpolation and extrapolation: The MATLAB has a function to do this, known as polyfit. The function polyfit finds the coefficients of the polynomial of the partic

Indexing into Vectors of structures: Frequently, when the data structure is a vector of structures, it is essential to iterate through the vector in order by various fields. F

Illustration of Sorting strings: To sort on the rows rather than second dimension should be specified. >> sort(words,2) ans = Hello Hdowy Hi Gbdeo