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
Use of built-in colormaps: MATLAB has built-in colormaps, it is also possible to generate others by using combinations of any colors. For illustration, the following generates

Function strncmp: The function strncmp compares only the first n characters in the strings and ignores the rest. The initial two arguments are strings to compare, and third ar

IS Functions for Strings: There are many functions for strings, that return logical true or false. The function isletter returns the logical true when the character is a lette

Creating a cell array: The other method of creating a cell array is easy to assign values to particular array elements and build it up element by element. Though, as explained

Use of While loop: Here is an illustration of calling the function, passing 5000 for the value of the input argument high. >> factgthigh(5000) ans = 5040 The itera

Sorting Vectors of structures: Whenever working with vector of structures, it is very common to sort based on a particular field within the structures. For illustration, recal

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

readlenwid function: function call: [length, width] = readlenwid; function header: function [l,w] = readlenwid In the function call, not any argument is passed; henc

A matlab function to calculate filter order

Defined a variable in work space: The variables defined in the script will become a part of the workspace: >> clear >> who >> mysummfile    15 >> who