Lab Assignment-09 Note: Create and save m-files for each problem individually. Copy all the m-files into a ‘single’ folder and upload the folder to D2L. Read chapters 2 and chapter 3.1-3.3 of the textbook (Introduction to MATLAB 7 for Engineers), solve the following problems in MATLAB. Given A= [■(3&-2&1@6&8&-5@7&9&10)] ; B= [■(6&9&-4@7&5&3@-8&2&1)] ; C= [■(-7&-5&2@10&6&1@3&-9&8)] ; Find the following A+B+C Verify the associative law (A+B)+C=A+ (B+C) D=Transpose(AB) E=A4 + B2 – C3 Find F, given that F = E-1 * D-1 – (AT) -1 Use MATLAB to solve the following set of equations 5x+7y + 9z = 12 7x- 4y + 8z = 86 15x- 9y – 6z = -57 Write a function that accepts temperature in degrees F and computes the corresponding value in degree C. The relation between the two is Aluminum alloys are made by adding other elements to aluminum to improve its properties, such as hardness or tensile strength. The following table shows the composition of five commonly used alloys, which are known by their alloy numbers ( 2024, 6061, and so on) [Kutz, 1999]. Obtain a matrix algorithm to compute the amounts of raw materials needed to produce a given amount of each alloy. Use MATLAB to determine how much raw material each type is needed to produce 1000tons of each alloy. Composition of aluminum alloys Alloy % Cu % Mg % Mn % Si % Zn 2024 4.4 1.5 0.6 0 0 6061 0 1 0 0.6 0 7005 0 1.4 0 0 4.5 7075 1.6 2.5 0 0 5.6 356.0 0 0.3 0 7 0

Lab Assignment-09 Note: Create and save m-files for each problem individually. Copy all the m-files into a ‘single’ folder and upload the folder to D2L. Read chapters 2 and chapter 3.1-3.3 of the textbook (Introduction to MATLAB 7 for Engineers), solve the following problems in MATLAB. Given A= [■(3&-2&1@6&8&-5@7&9&10)] ; B= [■(6&9&-4@7&5&3@-8&2&1)] ; C= [■(-7&-5&2@10&6&1@3&-9&8)] ; Find the following A+B+C Verify the associative law (A+B)+C=A+ (B+C) D=Transpose(AB) E=A4 + B2 – C3 Find F, given that F = E-1 * D-1 – (AT) -1 Use MATLAB to solve the following set of equations 5x+7y + 9z = 12 7x- 4y + 8z = 86 15x- 9y – 6z = -57 Write a function that accepts temperature in degrees F and computes the corresponding value in degree C. The relation between the two is Aluminum alloys are made by adding other elements to aluminum to improve its properties, such as hardness or tensile strength. The following table shows the composition of five commonly used alloys, which are known by their alloy numbers ( 2024, 6061, and so on) [Kutz, 1999]. Obtain a matrix algorithm to compute the amounts of raw materials needed to produce a given amount of each alloy. Use MATLAB to determine how much raw material each type is needed to produce 1000tons of each alloy. Composition of aluminum alloys Alloy % Cu % Mg % Mn % Si % Zn 2024 4.4 1.5 0.6 0 0 6061 0 1 0 0.6 0 7005 0 1.4 0 0 4.5 7075 1.6 2.5 0 0 5.6 356.0 0 0.3 0 7 0

info@checkyourstudy.com Whatsapp +919911743277
MCE 260 Fall 2015 Homework 4, due September 22, 2015. PRESENT CLEARLY HOW YOU DEVELOPED THE SOLUTION TO THE PROBLEMS Each problem is worth up to 5 points. Points are given as follows: 5 points: Work was complete and presented clearly, the answer is correct 4 points: Work was complete, but not clearly presented or some errors in calculation 3 points: Some errors or omissions in methods or presentation 2 points: Major errors or omissions in methods or presentation 1 point: Problem was understood but incorrect approach was used DO SOMETHING WITH LINKAGES 1. (5 points) Fig 4-16b shows a Stephenson 6-bar linkage. Assume that the linkage is driven by a constant speed motor on the fixed pivot of link 7. Draw this linkage schematically (dimensions are not important). The link numbering and vector loops are already defined in Fig 4-16b. Add symbols for the angles θ2… θ8 and the lengths L2… L8 to the Figure. 2. (5 points) There are two vector loops (1-2-3-4, and 4-5-6-7-8). Write the vector loop equations as separate X and Y equations for each loop. 3. (5 points) Identify the unknowns that must be solved for doing position analysis. Make sure that the number of unknowns is the same as the number of equations. Hint: “links” 3 and 5 are both on the (rigid) coupler, so there is a simple relationship between the two angles. 4. (5 points) Write the vector loop equations for the inverted crank-slider (Fig. 4-13). Identify the two unknowns that must be solved when it is driven by the slider joint, which means that length b is a known input (as in the hydraulic excavator). Write expressions for the elements of the 2×2 Jacobian matrix. 5. (5 points) Modify the Matlab code fbpos1vec.m to solve the position analysis problem for this system. You may choose the dimensions and the input (probably best to make this similar to Fig 4-13). Show the lines of Matlab code that you changed (and no other lines) and show the values for the two unknowns that you solved. Page 1 of 1

MCE 260 Fall 2015 Homework 4, due September 22, 2015. PRESENT CLEARLY HOW YOU DEVELOPED THE SOLUTION TO THE PROBLEMS Each problem is worth up to 5 points. Points are given as follows: 5 points: Work was complete and presented clearly, the answer is correct 4 points: Work was complete, but not clearly presented or some errors in calculation 3 points: Some errors or omissions in methods or presentation 2 points: Major errors or omissions in methods or presentation 1 point: Problem was understood but incorrect approach was used DO SOMETHING WITH LINKAGES 1. (5 points) Fig 4-16b shows a Stephenson 6-bar linkage. Assume that the linkage is driven by a constant speed motor on the fixed pivot of link 7. Draw this linkage schematically (dimensions are not important). The link numbering and vector loops are already defined in Fig 4-16b. Add symbols for the angles θ2… θ8 and the lengths L2… L8 to the Figure. 2. (5 points) There are two vector loops (1-2-3-4, and 4-5-6-7-8). Write the vector loop equations as separate X and Y equations for each loop. 3. (5 points) Identify the unknowns that must be solved for doing position analysis. Make sure that the number of unknowns is the same as the number of equations. Hint: “links” 3 and 5 are both on the (rigid) coupler, so there is a simple relationship between the two angles. 4. (5 points) Write the vector loop equations for the inverted crank-slider (Fig. 4-13). Identify the two unknowns that must be solved when it is driven by the slider joint, which means that length b is a known input (as in the hydraulic excavator). Write expressions for the elements of the 2×2 Jacobian matrix. 5. (5 points) Modify the Matlab code fbpos1vec.m to solve the position analysis problem for this system. You may choose the dimensions and the input (probably best to make this similar to Fig 4-13). Show the lines of Matlab code that you changed (and no other lines) and show the values for the two unknowns that you solved. Page 1 of 1

info@checkyourstudy.com
Lab 5 Math 551 Fall 2015 Goal: In this assignment we will look at two fractals, namely the Sierpinski fractal and the Barnsley Fern. During the lab session, your lab instructor will teach you the necessary MATLAB code to complete the assignment, which will be discussed in the lab on Thursday October 8th or Friday October 9th in the lab (CW 144 or CW 145). What you have to submit: An m- le containing all of the commands necessary to perform all the tasks described below. Submit this le on Canvas. Click: \Assignments”, click \MATLAB Project 5″, click \Submit Assignment”, then upload your .m le and click \Submit Assignment” again. Due date: Friday October 16, 5pm. No late submission will be accepted. TASKS A fractal can be de ned as a self-similar detailed pattern repeating itself. Some of the most well know fractals (the Mandelbrot set and Julia set) can be viewed here: http://classes.yale.edu/fractals/ The Sierpinski Fractal The program srnpnski(m,dist,n) gets its name from the mathematician W. Sierpinski. The only parameter that must be speci ed is m which determines the number of vertices that will be part of a regular polygon. For larger m it produces a graph which is similar to a snow ake. The program starts with a randomly chosen seed position given by the internal variable s. At each stage one of the vertices is chosen at random and a new point is produced which is dist away from the old point to the vertex. The value of dist should be between 0 and 1. The default value is 0.5. This process is repeated n times. The default value of n is 1500. 1. Create a new Matlab function: func t i on s rpns k i (m, di s t , n) %This c r e a t e s a snowf lake from m v e r t i c e s us ing n i t e r a t i o n s . i f nargin <3, n=1500; end i f nargin <2, d i s t =0.5; end c l f a x i s ( [ ?1 ,1 , ?1 ,1] ) p=exp (2 pi  i  ( 1 :m)/m) ; pl o t (p , '  ' ) hold s=rand+i  rand ; f o r j =1:n r=c e i l (m rand ) ; s=d i s t  s+(1?d i s t )p( r ) ; pl o t ( s , ' . ' ) end 2. Try out the following commands s rpns k i ( 3 ) s rpns k i ( 3 , 0 . 5 , 2 5 0 0 ) s rpns k i ( 3 , 0 . 5 , 5 0 0 0 ) s rpns k i ( 3 , 0 . 4 ) 1 s rpns k i ( 3 , 0 . 2 ) s rpns k i ( 5 ) s rpns k i ( 5 , 0 . 4 ) s rpns k i ( 5 , 0 . 3 ) s rpns k i ( 6 , 0 . 3 ) s rpns k i ( 8 , 0 . 3 , 5 0 0 0 ) The Barnsley Fern The following program is the famous Barnsley Fern. The only external parameter is n, the number of iterations. 3. Create a new Matlab function: func t i on f e r n (n) A1=[ 0 . 8 5 , 0 . 0 4 ; ?0 . 0 4 , 0 . 8 5 ] ; A2=[ ?0 . 1 5 , 0 . 2 8 ; 0 . 2 6 , 0 . 2 4 ] ; A3=[ 0 . 2 , ?0 . 2 6 ; 0 . 2 3 , 0 . 2 2 ] ; A4=[ 0 , 0 ; 0 , 0 . 1 6 ] ; T1=[ 0 ; 1 . 6 ] ; T2=[ 0 ; 0 . 4 4 ] ; T3=[ 0 ; 1 . 6 ] ; T4=[ 0 , 0 ] ; P1=0.85; P2=0.07; P3=0.07; P4=0.01; c l f ; s=rand ( 2 , 1 ) ; pl o t ( s ( 1 ) , s ( 2 ) , ' . ' ) hold f o r j =1:n r=rand ; i f r<=P1 , s=A1 s+T1 ; e l s e i f r<=P1+P2 , s=A2 s+T2 ; e l s e i f r<=P1+P2+P3 , s=A3 s+T3 ; e l s e s=A4 s ; end pl o t ( s ( 1 ) , s ( 2 ) , ' . ' ) end 4. Try the following commands: f e r n (100) f e r n (500) f e r n (1000) f e r n (3000) f e r n (5000) f e r n (10000) 2 5. Change the parameters in the fern program: A1=[ 0 . 5 , 0 ; 0 , 0 . 5 ] ; A2=[ 0 . 5 , 0 ; 0 , 0 . 5 ] ; A3=[ 0 . 5 , 0 ; 0 , 0 . 5 ] ; T1=[ 1 ; 1 ] ; T2=[ 1 ; 5 0 ] ; T3=[ 5 0 ; 5 0 ] ; P1=0.33; P2=0.33; P3=0.34; Call the new program srptri.m. Try the command s r p t r i (5000) You should see a familiar looking result. 6. Change the parameters in the fern program: A1=[ 0 , 0 ; 0 , 0 . 5 ] ; A2=[ 0 . 4 2 , ?0 . 4 2 ; 0 . 4 2 , 0 . 4 2 ] ; A3=[ 0 . 4 2 , 0 . 4 2 ; ?0 . 4 2 , 0 . 4 2 ] ; A4=[ 0 . 1 , 0 ; 0 , 0 . 1 ] ; T1=[ 0 ; 0 ] ; T2=[ 0 ; 0 . 2 ] ; T3=[ 0 ; 0 . 2 ] ; T4=[ 0 , 0 . 2 ] ; P1=0.05; P2=0.4; P3=0.4; P4=0.15; Call the new program srptree.m. Try the command s r p t r e e (5000) This is an example of a fractal tree. Some nice animations of fractal trees can be seen here: http://classes.yale.edu/fractals/ MATLAB commands to learn: Cl f , c e i l , imaginary uni t I , i f . . e l s e i f . . e l s e . . end 3

Lab 5 Math 551 Fall 2015 Goal: In this assignment we will look at two fractals, namely the Sierpinski fractal and the Barnsley Fern. During the lab session, your lab instructor will teach you the necessary MATLAB code to complete the assignment, which will be discussed in the lab on Thursday October 8th or Friday October 9th in the lab (CW 144 or CW 145). What you have to submit: An m- le containing all of the commands necessary to perform all the tasks described below. Submit this le on Canvas. Click: \Assignments”, click \MATLAB Project 5″, click \Submit Assignment”, then upload your .m le and click \Submit Assignment” again. Due date: Friday October 16, 5pm. No late submission will be accepted. TASKS A fractal can be de ned as a self-similar detailed pattern repeating itself. Some of the most well know fractals (the Mandelbrot set and Julia set) can be viewed here: http://classes.yale.edu/fractals/ The Sierpinski Fractal The program srnpnski(m,dist,n) gets its name from the mathematician W. Sierpinski. The only parameter that must be speci ed is m which determines the number of vertices that will be part of a regular polygon. For larger m it produces a graph which is similar to a snow ake. The program starts with a randomly chosen seed position given by the internal variable s. At each stage one of the vertices is chosen at random and a new point is produced which is dist away from the old point to the vertex. The value of dist should be between 0 and 1. The default value is 0.5. This process is repeated n times. The default value of n is 1500. 1. Create a new Matlab function: func t i on s rpns k i (m, di s t , n) %This c r e a t e s a snowf lake from m v e r t i c e s us ing n i t e r a t i o n s . i f nargin <3, n=1500; end i f nargin <2, d i s t =0.5; end c l f a x i s ( [ ?1 ,1 , ?1 ,1] ) p=exp (2 pi  i  ( 1 :m)/m) ; pl o t (p , '  ' ) hold s=rand+i  rand ; f o r j =1:n r=c e i l (m rand ) ; s=d i s t  s+(1?d i s t )p( r ) ; pl o t ( s , ' . ' ) end 2. Try out the following commands s rpns k i ( 3 ) s rpns k i ( 3 , 0 . 5 , 2 5 0 0 ) s rpns k i ( 3 , 0 . 5 , 5 0 0 0 ) s rpns k i ( 3 , 0 . 4 ) 1 s rpns k i ( 3 , 0 . 2 ) s rpns k i ( 5 ) s rpns k i ( 5 , 0 . 4 ) s rpns k i ( 5 , 0 . 3 ) s rpns k i ( 6 , 0 . 3 ) s rpns k i ( 8 , 0 . 3 , 5 0 0 0 ) The Barnsley Fern The following program is the famous Barnsley Fern. The only external parameter is n, the number of iterations. 3. Create a new Matlab function: func t i on f e r n (n) A1=[ 0 . 8 5 , 0 . 0 4 ; ?0 . 0 4 , 0 . 8 5 ] ; A2=[ ?0 . 1 5 , 0 . 2 8 ; 0 . 2 6 , 0 . 2 4 ] ; A3=[ 0 . 2 , ?0 . 2 6 ; 0 . 2 3 , 0 . 2 2 ] ; A4=[ 0 , 0 ; 0 , 0 . 1 6 ] ; T1=[ 0 ; 1 . 6 ] ; T2=[ 0 ; 0 . 4 4 ] ; T3=[ 0 ; 1 . 6 ] ; T4=[ 0 , 0 ] ; P1=0.85; P2=0.07; P3=0.07; P4=0.01; c l f ; s=rand ( 2 , 1 ) ; pl o t ( s ( 1 ) , s ( 2 ) , ' . ' ) hold f o r j =1:n r=rand ; i f r<=P1 , s=A1 s+T1 ; e l s e i f r<=P1+P2 , s=A2 s+T2 ; e l s e i f r<=P1+P2+P3 , s=A3 s+T3 ; e l s e s=A4 s ; end pl o t ( s ( 1 ) , s ( 2 ) , ' . ' ) end 4. Try the following commands: f e r n (100) f e r n (500) f e r n (1000) f e r n (3000) f e r n (5000) f e r n (10000) 2 5. Change the parameters in the fern program: A1=[ 0 . 5 , 0 ; 0 , 0 . 5 ] ; A2=[ 0 . 5 , 0 ; 0 , 0 . 5 ] ; A3=[ 0 . 5 , 0 ; 0 , 0 . 5 ] ; T1=[ 1 ; 1 ] ; T2=[ 1 ; 5 0 ] ; T3=[ 5 0 ; 5 0 ] ; P1=0.33; P2=0.33; P3=0.34; Call the new program srptri.m. Try the command s r p t r i (5000) You should see a familiar looking result. 6. Change the parameters in the fern program: A1=[ 0 , 0 ; 0 , 0 . 5 ] ; A2=[ 0 . 4 2 , ?0 . 4 2 ; 0 . 4 2 , 0 . 4 2 ] ; A3=[ 0 . 4 2 , 0 . 4 2 ; ?0 . 4 2 , 0 . 4 2 ] ; A4=[ 0 . 1 , 0 ; 0 , 0 . 1 ] ; T1=[ 0 ; 0 ] ; T2=[ 0 ; 0 . 2 ] ; T3=[ 0 ; 0 . 2 ] ; T4=[ 0 , 0 . 2 ] ; P1=0.05; P2=0.4; P3=0.4; P4=0.15; Call the new program srptree.m. Try the command s r p t r e e (5000) This is an example of a fractal tree. Some nice animations of fractal trees can be seen here: http://classes.yale.edu/fractals/ MATLAB commands to learn: Cl f , c e i l , imaginary uni t I , i f . . e l s e i f . . e l s e . . end 3

info@checkyourstudy.com Whatsapp +919911743277
Lab Assignment-Matlab 1 Note: You should write your solutions in a Word file and upload it to D2L. For each problem, you shall specify the commands you used in MATLAB as well as the solutions shown in MATLAB. This can be done by copying the text from MATLAB’s command window then paste them onto your Word file. Read chapters 1.1-1.5 of the textbook (Introduction to MATLAB 7 for Engineers), solve the following problems in MATLAB. Suppose that x=9 and y=7. Use MATLAB to compute the following, and check the results with a calculator. a) 1/(1-1/x^5 ) b) 3Πx^3 c) 4y/(5x-9) d) (3(y-7))/(9x-5) Assuming that the variables a, b, c, d, and f are scalars, write MATLAB statements to compute and display the following expressions. Test your statements for the values a=1.2, b=2.34, c=0.72, d=0.81, e= 1.29 and f=19.83. a) x=1+a/b+c/d^2 + e/f^3 b) s= (b-a+e)/(d-c+f) c) r=1/(1/a+1/b+1/c+1/d-1/f) d) ab/d f^2/2 The volume of a sphere is given by V= (4/3)*Πr^3, where r is the radius. Use MATLAB to compute the radius of a sphere having a volume 36 percent greater than that of a sphere of radius 4 ft. Suppose x takes on the values x=1, 1.2, 1.4…, 5. Use MATLAB to compute the array y that results from the function y=sin⁡〖(4x).〗 Use MATLAB to determine how many elements are in the array and the value of the third element in the array y. Use MATLAB to determine how many elements are in the array sin⁡(-π/2):0.05: cos⁡(0). Use MATLAB to determine the 10th element. Use MATLAB to calculate e^(〖(-2.5)〗^3 )+3.47 log⁡〖14+ ∜287〗 (3.4)^7 log⁡〖14+ ∜287〗 〖sin〗^2⁡(4.12Π/6) sin⁡〖(4.12Π/6)^2 〗 Use MATLAB to plot the functions u=2 log_10⁡(6x+5)and v=3 sin⁡(7x) over the interval 0≤x≤2. Properly label the plot and each curve. The variables u and v represent speed in miles per hour; the variable x represents distance in miles. Example1, Suppose that x = 2 and y = 5. Use MATLAB to compute the following. You should put the following in your Word file >> x = 2; >> y = 5; >>(y*x^3)/(x-y) ans = -13.3333 Example 2, Use MATLAB to plot the function Put a title on the plot and properly label the axes. The variable T represents temperature in degrees Celsius; the variable t represents time in minutes. You should report like the following: >> t=linspace(1,3,100); >> T=6*log(t)-7*exp(0.2*t); >> plot(t,T); >> xlabel(‘t (minutes)’); >> ylabel(‘T (^oC)’); >> title(‘Change of temperature with time’); Also paste the resultant figure in the Word file (select from the figure window: Edit .Copy Figure, then paste in your Word file), you should have

Lab Assignment-Matlab 1 Note: You should write your solutions in a Word file and upload it to D2L. For each problem, you shall specify the commands you used in MATLAB as well as the solutions shown in MATLAB. This can be done by copying the text from MATLAB’s command window then paste them onto your Word file. Read chapters 1.1-1.5 of the textbook (Introduction to MATLAB 7 for Engineers), solve the following problems in MATLAB. Suppose that x=9 and y=7. Use MATLAB to compute the following, and check the results with a calculator. a) 1/(1-1/x^5 ) b) 3Πx^3 c) 4y/(5x-9) d) (3(y-7))/(9x-5) Assuming that the variables a, b, c, d, and f are scalars, write MATLAB statements to compute and display the following expressions. Test your statements for the values a=1.2, b=2.34, c=0.72, d=0.81, e= 1.29 and f=19.83. a) x=1+a/b+c/d^2 + e/f^3 b) s= (b-a+e)/(d-c+f) c) r=1/(1/a+1/b+1/c+1/d-1/f) d) ab/d f^2/2 The volume of a sphere is given by V= (4/3)*Πr^3, where r is the radius. Use MATLAB to compute the radius of a sphere having a volume 36 percent greater than that of a sphere of radius 4 ft. Suppose x takes on the values x=1, 1.2, 1.4…, 5. Use MATLAB to compute the array y that results from the function y=sin⁡〖(4x).〗 Use MATLAB to determine how many elements are in the array and the value of the third element in the array y. Use MATLAB to determine how many elements are in the array sin⁡(-π/2):0.05: cos⁡(0). Use MATLAB to determine the 10th element. Use MATLAB to calculate e^(〖(-2.5)〗^3 )+3.47 log⁡〖14+ ∜287〗 (3.4)^7 log⁡〖14+ ∜287〗 〖sin〗^2⁡(4.12Π/6) sin⁡〖(4.12Π/6)^2 〗 Use MATLAB to plot the functions u=2 log_10⁡(6x+5)and v=3 sin⁡(7x) over the interval 0≤x≤2. Properly label the plot and each curve. The variables u and v represent speed in miles per hour; the variable x represents distance in miles. Example1, Suppose that x = 2 and y = 5. Use MATLAB to compute the following. You should put the following in your Word file >> x = 2; >> y = 5; >>(y*x^3)/(x-y) ans = -13.3333 Example 2, Use MATLAB to plot the function Put a title on the plot and properly label the axes. The variable T represents temperature in degrees Celsius; the variable t represents time in minutes. You should report like the following: >> t=linspace(1,3,100); >> T=6*log(t)-7*exp(0.2*t); >> plot(t,T); >> xlabel(‘t (minutes)’); >> ylabel(‘T (^oC)’); >> title(‘Change of temperature with time’); Also paste the resultant figure in the Word file (select from the figure window: Edit .Copy Figure, then paste in your Word file), you should have

info@checkyourstudy.com Whatsapp +919911743277
Consider the cubic equation ax3 + bx2 + cx + d = 0, (1) where a, b, c, and d are real input coefficients. Develop a matlab program to find all roots of equation (1) using the methods discussed in the Numerical Analysis class. Your program can not use the matlab built-in functions fzero and roots. You should turn in a .m file cubic24903674.m which contains a matlab function of the form function [rts,info] = cubic24903674(C) where, C = (a, b, c, d) is the input vector of coefficients, rts is the vector of roots and info is your output message. Your program will be stress-tested against cubic equations that may have: 1. (40 points) random roots; or 2. (20 points) very large or very small roots; or 3. (20 points) multiple roots or nearly multiple roots; or 4. (20 points) less than 3 roots or more than 3 roots. You will receive credit for a test polynomial only if your program gets the number of roots correctly, and only then will each correct root (accurate to within a relative error of at most 10^(−6) , as compared to the roots function in matlab) receive additional credit. Your program will receive 0 points if the strings fzero or roots (both in lower case letters) show up anywhere in your .m file.

Consider the cubic equation ax3 + bx2 + cx + d = 0, (1) where a, b, c, and d are real input coefficients. Develop a matlab program to find all roots of equation (1) using the methods discussed in the Numerical Analysis class. Your program can not use the matlab built-in functions fzero and roots. You should turn in a .m file cubic24903674.m which contains a matlab function of the form function [rts,info] = cubic24903674(C) where, C = (a, b, c, d) is the input vector of coefficients, rts is the vector of roots and info is your output message. Your program will be stress-tested against cubic equations that may have: 1. (40 points) random roots; or 2. (20 points) very large or very small roots; or 3. (20 points) multiple roots or nearly multiple roots; or 4. (20 points) less than 3 roots or more than 3 roots. You will receive credit for a test polynomial only if your program gets the number of roots correctly, and only then will each correct root (accurate to within a relative error of at most 10^(−6) , as compared to the roots function in matlab) receive additional credit. Your program will receive 0 points if the strings fzero or roots (both in lower case letters) show up anywhere in your .m file.

info@checkyourstudy.com Whatsapp +919711743277
EGR 140 Scientific Programming Assignment # 7 Spring 2017 Use MATLAB to solve each problem by writing script files; copy and paste the script file AND the results in the Command Window and/or plot in the Figure Window to a WORD document that has your name and section in the headers of each page and the page number in each footer. Edit the output to remove extra lines and empty spaces. The script files SHOULD have comments for easy readability; take a print out of the Word file and staple before submission. Due by 3 PM on April 11, 2017. Write a used-defined function that calculates the average and the standard deviation of a list of numbers. Use the function to calculate the average and the standard deviation of the following list of grades: 80 75 91 60 79 89 65 80 95 50 81 Note: The average x_ave (or mean) of a given set of n number x_1,x_2,…..,x_n is given by: x_ave=(x_1+x_2+x_3+⋯+x_n)/n The standard deviation is given by: σ=√((∑_(i=1)^(i=n)▒(x_i-x_ave )^2 )/(n-1)) DO not use built-in functions to calculate the mean and the standard deviation. Write a user-defined function that arranges the digits of a given (positive) number in a row vector in the same order as they appear in the number; the function should also arrange the digits in the decimal part in a different vector. For example, if the number is 2645.12, the vectors should be [2 6 4 5] and [1 2]. The whole number can be from 0 to 10 digits long and the decimal part 0 to 6. Check the validity of the function using a few numbers of your choice. A fenced enclosure consists of a rectangle of length L and width 2R, and a semicircle of radius R, as shown in Figure. The enclosure is to be built to have an area A of 1600 ft2. The cost of the fence is $40 per foot for the curved portion, and $30 per foot for the straight sides. Determine the values of R and L required to minimize the total cost of the fence and the minimum cost using calculus approach. A water tank consists of a cylindrical part of radius r and height h, and a hemispherical top. The tank is to be constructed to hold 500 meter3 of fluid when filled. The cost to construct the cylindrical part of the tank is $300 per square meter of the surface area; the hemispherical part costs $400 per square meter. Determine the radius that results in the least cost and compute the corresponding height and the cost using graphical approach. Verify your results using the calculus approach. A ceramic tile has the design shown in the figure. The shaded area is painted black and the rest of the tile is white. The border line between the red and the white areas follows the equation: y=Asin(x) Determine A such that the area of the white and black colors will be the same.

EGR 140 Scientific Programming Assignment # 7 Spring 2017 Use MATLAB to solve each problem by writing script files; copy and paste the script file AND the results in the Command Window and/or plot in the Figure Window to a WORD document that has your name and section in the headers of each page and the page number in each footer. Edit the output to remove extra lines and empty spaces. The script files SHOULD have comments for easy readability; take a print out of the Word file and staple before submission. Due by 3 PM on April 11, 2017. Write a used-defined function that calculates the average and the standard deviation of a list of numbers. Use the function to calculate the average and the standard deviation of the following list of grades: 80 75 91 60 79 89 65 80 95 50 81 Note: The average x_ave (or mean) of a given set of n number x_1,x_2,…..,x_n is given by: x_ave=(x_1+x_2+x_3+⋯+x_n)/n The standard deviation is given by: σ=√((∑_(i=1)^(i=n)▒(x_i-x_ave )^2 )/(n-1)) DO not use built-in functions to calculate the mean and the standard deviation. Write a user-defined function that arranges the digits of a given (positive) number in a row vector in the same order as they appear in the number; the function should also arrange the digits in the decimal part in a different vector. For example, if the number is 2645.12, the vectors should be [2 6 4 5] and [1 2]. The whole number can be from 0 to 10 digits long and the decimal part 0 to 6. Check the validity of the function using a few numbers of your choice. A fenced enclosure consists of a rectangle of length L and width 2R, and a semicircle of radius R, as shown in Figure. The enclosure is to be built to have an area A of 1600 ft2. The cost of the fence is $40 per foot for the curved portion, and $30 per foot for the straight sides. Determine the values of R and L required to minimize the total cost of the fence and the minimum cost using calculus approach. A water tank consists of a cylindrical part of radius r and height h, and a hemispherical top. The tank is to be constructed to hold 500 meter3 of fluid when filled. The cost to construct the cylindrical part of the tank is $300 per square meter of the surface area; the hemispherical part costs $400 per square meter. Determine the radius that results in the least cost and compute the corresponding height and the cost using graphical approach. Verify your results using the calculus approach. A ceramic tile has the design shown in the figure. The shaded area is painted black and the rest of the tile is white. The border line between the red and the white areas follows the equation: y=Asin(x) Determine A such that the area of the white and black colors will be the same.

checkyourstudy.com Whatsapp +919891515290
MATH 248 SPRIN 2017 – LABORATORY ASSIGNMENT 5 – Sochacki DUE: Monday April 3, 2017 POINTS: 50 You are to write a Matlab script that will solve an arbitrary tri-diagonal matrix system of equations using Gaussian elimination. Your program should determine if a unique solution exists and if it does give an approximation to this unique solution. You MUST use the computer with formatted output in a nice layout. Guidelines: (1) First you should do a neat one-three page (8.5 x 11) write up showing how to solve a tri-diagonal system of equations and do an operation count to determine the solution. (2) Your program should print the answer as a column in a nice format. (3) You should make sure your code can minimize round-off errors. (4) As usual, the professional quality of your scripts and write up is part of your evaluation. (5) You can do the following bonus problems for 2 points each. (i) Give the determinant of the matrix defining the SLE (ii) Give the inverse of the matrix defining the SLE

MATH 248 SPRIN 2017 – LABORATORY ASSIGNMENT 5 – Sochacki DUE: Monday April 3, 2017 POINTS: 50 You are to write a Matlab script that will solve an arbitrary tri-diagonal matrix system of equations using Gaussian elimination. Your program should determine if a unique solution exists and if it does give an approximation to this unique solution. You MUST use the computer with formatted output in a nice layout. Guidelines: (1) First you should do a neat one-three page (8.5 x 11) write up showing how to solve a tri-diagonal system of equations and do an operation count to determine the solution. (2) Your program should print the answer as a column in a nice format. (3) You should make sure your code can minimize round-off errors. (4) As usual, the professional quality of your scripts and write up is part of your evaluation. (5) You can do the following bonus problems for 2 points each. (i) Give the determinant of the matrix defining the SLE (ii) Give the inverse of the matrix defining the SLE

checkyourstudy.com Whatsapp +919911743277