Question: *please use Matlab to generate code and answer all questions. *create a problem statment, code precedure, results and a conclusion. *complete the extra credit portion.



All problems must be formatted correctly in the report to obtain full points. Code just be well commented and sectioned. Any information missing from the report or the simple act of typing out results in MATLAB and calling those results will result in a zero for the grade. If you have any questions or comments, feel free to join office hours or to email me. Let's start from scratch, my goal is for you to practice your development of loops, both while and for loops. Below you will see a new segment of code that was hardcoded to execute. Your job is to create variable code to solve for the final value of x while storing all the values of x and y. To create the loops, you want to stop running the code when x>=350. Taking the number of iterations, it takes to solve the while loop outputs use it to solve the for-loop version of the code. For the results section, please identify how many iterations it takes to solve for the final value of x. clc;clear;format compact; x=1;y=5;u=3.1 Alpha =y4+((u1.2+(84y)/2.5)); Beta = Alpha * (x+7)/(x+1); x1= Beta; x=x1;u=u.6;y=(1.5y)/(1.2); Alpha =y4+((u1.2+(84y)/2.5)); Beta = Alpha (x+7)/(x+1); x1= Beta; x=x1;u=u.6;y=(1.5y)/(1.2); Alpha =y4+((u1.2+(84y)/2.5)); Beta=Alpha * (x+7)/(x+1); y=(1.5y)/(1.2); x1= Beta; x=x1;u=u.6; Alpha =y4+((u1.2+(84y)/2.5)); Beta = Alpha * (x+7)/(x+1); x1= Beta; x=x1;y=(1.5y)/(1.2);u=u.6; Alpha =y4+((u1.2+(84y)/2.5)); Beta = Alpha * (x+7)/(x+1); x1= Beta; y=(1.5y)/(1.2);x=x1; u=u.6 Alpha =y4+((u1.2+(84y)/2.5)); Beta= Alpha * (x+7)/(x+1); x1= Beta; x=x1;u=u.6;y=(1.5y)/(1.2); Alpha =y4+((u1.2+(84y)/2.5)); Beta=Alpha * (x+7)/(x+1); y=(1.5y)/(1.2);x1= Beta; x=x1;u=u.6 Alpha =y4+((u1.2+(84y)/2.5)); Beta= Alpha * (x+7)/(x+1); x1= Beta; x=x1;u=u.6;y=(1.5y)/(1.2); Alpha =y4+((u1.2+(84y)/2.5)); Beta= Alpha * (x+7)/(x+1); x1= Beta; y=(1.5y)/(1.2);x=x1;u=u.6 Alpha =y4+((u1.2+(84y)/2.5)); Beta = Alpha * (x+7)/(x+1); x1= Beta; x=x1;u=u.6;y=(1.5y)/(1.2); Alpha =y4+((u1.2+(84y)/2.5)); Beta= Alpha * (x+7)/(x+1); y=(1.5y)/(1.2);x1= Beta; x=x1;u=u.6 %% Please continue the code if you need to continue the hard code %% If the process is not as obvious take a few minutes to run/understand the code..... This may take a bit Expected outputs: Report: Full Report Format Code: In code comment the purpose of the segment of code is. (Short and direct) Variable Code that solves the problem Output results with fprintf() where applicable all other outputs use disp() Code is individually developed and well commented. Extra Credit: (30 pts) Create your own problem and solutions. My goal is for you to create your own Matlab problem that requires you to solve a repeated segment of commands. The story line you use is up to you. You are able to use anything we have learned so far. Each submission will be graded individually, but the general rubric for points will lie within these requirements: - Solution Includes While loop 10 pts each - Solution Includes For loop 8 pts each - Solution Includes Conditional Statement 7 pts each - Solution Includes hard code 5 pts each - Solution includes an interesting application 12 pts - Solution includes anything we have not learned far 2 pts each concept. Expected outputs: Report: Full Report Format Code: In code comment the purpose of the segment of code is. (Short and direct) Variable Code that solves the problem Output results with f printf() where applicable all other outputs use disp() Code is individually developed and well commented
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
