Analyze the given function around its critical point. ▪ f(x) Script 1 %Use symbolic processing with the variable x 3 4%Enconde the function f(x) 5 f(x) = 6 7 %Set the distance to the left/right of the critical point 8 h 0.01 9 10 %Find the first derivative of the function 11 fp(x) = 12 13 %Solve for the roots of fp 14 root1 solve(fp) 15 16 %Consider the first critical point only 17 c=root1 (1) 18 19 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 20 if (fp(c+h) >0) 21 IODR = 22 elseif (fp(c+h) <0) 23 IODR = 24 end CP= 36 elseif IoDL=="Decreasing" & IODR =="Increasing" 37 CP= 38 end 25 26 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 27 if (fp(c-h)>0) 28 IODL = 29 elseif (fp(c-h) <0) 30 IODL = 31 end 32 33 %Use first derivative Test to Determine if the critical point is a "Maximum" point or "Minimum" point. 34 if IoDL=="Increasing" & IODR =="Decreasing" 35 39 40 %Find the second derivative of the function 41 fpp(x)= diff(f, 2); 42 43 %Find the points of inflection of the function by equating the second derivative of the function to zero. 44 CC = 45 CP2 = Save 56 %GRAPH THE FUNCTION 57 clf(); 58 g1 ezplot (f); 59 hold on 46 %Apply Second Derivative Test to check whether the critical point is a "Maximum" point, a "Minimum" point or "Point of Inflection". 47 if fpp(c) >0 48 CP2 = 49 elseif fpp (c) <0 50 CP2 = 51 else 52 53 end 54 55 60 grid on 61 plot (c, f(c), 'r*') 62 title("Curve Tracing") C Reset 63 text (c+.5, f(c), ["("+string(c)+","+string(f(c))+") 64 "+CP ]) MATLAB Documentation ▶ Run Script ?
Analyze the given function around its critical point. ▪ f(x) Script 1 %Use symbolic processing with the variable x 3 4%Enconde the function f(x) 5 f(x) = 6 7 %Set the distance to the left/right of the critical point 8 h 0.01 9 10 %Find the first derivative of the function 11 fp(x) = 12 13 %Solve for the roots of fp 14 root1 solve(fp) 15 16 %Consider the first critical point only 17 c=root1 (1) 18 19 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 20 if (fp(c+h) >0) 21 IODR = 22 elseif (fp(c+h) <0) 23 IODR = 24 end CP= 36 elseif IoDL=="Decreasing" & IODR =="Increasing" 37 CP= 38 end 25 26 Determine if the function is "Increasing" or "Decreasing" at the right of the critical point 27 if (fp(c-h)>0) 28 IODL = 29 elseif (fp(c-h) <0) 30 IODL = 31 end 32 33 %Use first derivative Test to Determine if the critical point is a "Maximum" point or "Minimum" point. 34 if IoDL=="Increasing" & IODR =="Decreasing" 35 39 40 %Find the second derivative of the function 41 fpp(x)= diff(f, 2); 42 43 %Find the points of inflection of the function by equating the second derivative of the function to zero. 44 CC = 45 CP2 = Save 56 %GRAPH THE FUNCTION 57 clf(); 58 g1 ezplot (f); 59 hold on 46 %Apply Second Derivative Test to check whether the critical point is a "Maximum" point, a "Minimum" point or "Point of Inflection". 47 if fpp(c) >0 48 CP2 = 49 elseif fpp (c) <0 50 CP2 = 51 else 52 53 end 54 55 60 grid on 61 plot (c, f(c), 'r*') 62 title("Curve Tracing") C Reset 63 text (c+.5, f(c), ["("+string(c)+","+string(f(c))+") 64 "+CP ]) MATLAB Documentation ▶ Run Script ?
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
DUE NOW. Please answer the "script part" given the problem. See also the guide on how to solve the problem using script. Thank you!
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY