Question
After researching the basic background, provide a clear problem statement below, including inputs and outputs, constants, and assumptions. 2. Use a top-down iterative procedure to
- After researching the basic background, provide a clear problem statement below, including inputs and outputs, constants, and assumptions.
2. Use a top-down iterative procedure to develop an algorithm in pseudocode. One of the most efficient ways to do this is to type your pseudocode directly into the Editor window in MATLAB (click New Script to open), as comment lines preceded by the % symbol. You can later translate each line of pseudocode into one or more MATLAB code statements, leaving the original pseudocode as comment lines in the final program, which will help you or another programmer decipher your code at a later date.
Copy and paste your pseudocode below:
3. Turn this algorithm into a working MATLAB program. A couple of hints:
a) The linspace function is often the most appropriate choice when generating vectors of values for plotting, especially when the final value is not known in advance. During initial development of the program, the number of elements in the vector can be kept small (e.g., 4 or 5) to aid in troubleshooting and validation, and then later scaled up to a sufficiently large number (e.g., 50-100) so as to produce a smooth-looking plot.
b)In this exercise, you are asked to plot two different graphs in the same program. However, if you use the plot command a second time, it simply overwrites the first graph in the open figure window. The solution is to use the command figure(2) before the second use of the plot command; this will open a second figure window for the new plot.
Paste your successful code here (including descriptive comments):
Paste your output here (both values in command window and plots):
To copy & paste plots from MATLAB, select EditCopy Figure in the Figure window. Then paste into the Word doc.
4.Indicate below the validation that you performed on your program in order to evaluate whether it was functioning properly, and provide supporting evidence. Also, have you identified problems for future development?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started