Question: Write a MATLAB that implements the algorithm designed in the Topic 1 assignment Non-Linear Flow Chart. Display the calculated values using the appropriate format for
Write a MATLAB that implements the algorithm designed in the Topic 1 assignment "Non-"Linear Flow Chart." Display the calculated values using the appropriate format for a dollar amount (dollar sign and two decimal places).
Topic 1 assignment "Non-Linear Flow Chart" is;
Description
Flow charts commonly contain features such as decisions and loops which control the direction taken by the program. Not all programs are "linear," and they may not always take the same path from start to finish, especially when user input can produce a variety of scenarios. In order to have a bug-free program, the designer needs to consider the full range of outcomes and consider issues such as malformed input, data type limitations, and available memory on the computer.
A system is needed in which the user supplies two values that are used to compute a numeric series. These values become the starting point of the series, and the program will use them to compute the subsequent terms by adding each of the previous two values together. For example, if the user inputs the numbers 2 and 5, the series would begin as follows:
2, 5, 7, 12, 19, 31, 50, 81, 131,
The system should print each new value up until the point is reached that the data is no longer valid due to data storage limitations (based on the data type selected). Create a flow chart that describes this algorithm, including the means by which you chose to end the calculations. Show a sufficient level of detail that would be necessary to convert it into code in the future. The logic should be independent of the actual language in which it is to be implemented.
NOTE: You don't need to create the flowchart. The point of this question is to write in MATLAB.
Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
