MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
5th Edition
ISBN: 9781118629864
Author: Amos Gilat
Publisher: WILEY
bartleby

Videos

Question
Book Icon
Chapter 8, Problem 1P
To determine

To plot:

The polynomial y=0.1x50.2x4x3+5x241.5x+235 in the domain 6x6 by first creating a vector for x, next using the polyval function to calculate y, and then using the plot function.

Expert Solution & Answer
Check Mark

Answer to Problem 1P

Solution:

The plot of the given polynomial y=0.1x50.2x4x3+5x241.5x+235 is stated as follows.

Explanation of Solution

The given polynomial function is,

y=0.1x50.2x4x3+5x241.5x+235 …… (1)

The range of the function is 6x6.

Substitute the value of x=6 in the above equation.

y=0.1x50.2x4x3+5x241.5x+235=0.1(6)50.2(6)4(6)3+5(6)241.5(6)+235=156.8000

Substitute the value of x=6 in equation (1).

y=0.1x50.2x4x3+5x241.5x+235=0.1(6)50.2(6)4(6)3+5(6)241.5(6)+235=468.4000

Hence, the value of y lies from 156.8000y468.4000.

Write the MATLAB script to plot the polynomial y=0.1x50.2x4x3+5x241.5x+235 in the domain 6x6 by first creating a vector for x, next using the polyval function to calculate y, and then using the plot function.

MATLAB Code:

%MATLAB program to plot the polynomial function

x = -6:0.1:6;%Define a vector x.

y = [0.1 -0.2 -1 5 -41.5 235];

r = polyval(y,x);%polyval function is used to calculate y

plot(x,r)

xlabel('x')

ylabel('y')

Save the MATLAB script with the name, Chapter8_29864_8_1P.m in the current folder. Execute the script by typing the script name at the command window to get the plot of the polynomial y=0.1x50.2x4x3+5x241.5x+235 in the domain 6x6 by first creating a vector for x, next using the polyval function to calculate y, and then using the plot function.

Result:

MATLAB: An Introduction with Applications, Chapter 8, Problem 1P

Conclusion:

Therefore, the plot of the given polynomial y=0.1x50.2x4x3+5x241.5x+235 is stated above.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Scenario Sales of products by color follow a peculiar, but predictable, pattern that determines how many units will sell in any given year. This pattern is shown below Product Color 1995 1996 1997 Red 28 42 21 1998 23 1999 29 2000 2001 2002 Unit Sales 2003 2004 15 8 4 2 1 2005 2006 discontinued Green 26 39 20 22 28 14 7 4 2 White 43 65 33 36 45 23 12 Brown 58 87 44 48 60 Yellow 37 56 28 31 Black 28 42 21 Orange 19 29 Purple Total 28 42 21 49 68 78 95 123 176 181 164 127 24 179 Questions A) Which color will sell the most units in 2007? B) Which color will sell the most units combined in the 2007 to 2009 period? Please show all your analysis, leave formulas in cells, and specify any assumptions you make.
One hundred students were surveyed about their preference between dogs and cats. The following two-way table displays data for the sample of students who responded to the survey. Preference Male Female TOTAL Prefers dogs \[36\] \[20\] \[56\] Prefers cats \[10\] \[26\] \[36\] No preference \[2\] \[6\] \[8\] TOTAL \[48\] \[52\] \[100\] problem 1 Find the probability that a randomly selected student prefers dogs.Enter your answer as a fraction or decimal. \[P\left(\text{prefers dogs}\right)=\]      Incorrect   Check Hide explanation Preference Male Female TOTAL Prefers dogs \[\blueD{36}\] \[\blueD{20}\] \[\blueE{56}\] Prefers cats \[10\] \[26\] \[36\] No preference \[2\] \[6\] \[8\] TOTAL \[48\] \[52\] \[100\] There were \[\blueE{56}\] students in the sample who preferred dogs out of \[100\] total students.
Business discuss
Knowledge Booster
Background pattern image
Statistics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc
Text book image
Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning
Text book image
Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning
Text book image
Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON
Text book image
The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman
Text book image
Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman
Vector Components and Projections in 3-Dimensions; Author: turksvids;https://www.youtube.com/watch?v=DfIsa7ArxSo;License: Standard YouTube License, CC-BY
Linear Algebra 6.2.2 Orthogonal Projections; Author: Kimberly Brehm;https://www.youtube.com/watch?v=fqbwErsP8Xw;License: Standard YouTube License, CC-BY