MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
6th Edition
ISBN: 9781119256830
Author: Amos Gilat
Publisher: John Wiley & Sons Inc
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 8, Problem 1P
To determine

To plot:

The polynomial y=0.5x50.3x415.5x3+7x2+36x7 in the domain 4x4 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.5x50.3x415.5x3+7x2+36x7 is stated as follows.

Explanation of Solution

The given polynomial function is,

    y=0.5x50.3x415.5x3+7x2+36x7 ............. (1)

The range of function is 4x4.

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

    y=0.5x50.3x415.5x3+7x2+36x7=0.5(4)50.3(4)415.5(4)3+7(4)2+36(4)7=45.4

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

    y=0.5x50.3x415.5x3+7x2+36x7=0.5(4)50.3(4)415.5(4)3+7(4)2+36(4)7=101.80

Hence, the value of y lies from 45.4y101.8.

Write the MATLAB script to plot the polynomial y=0.5x50.3x415.5x3+7x2+36x7 in the domain 4x4 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 = -4:0.1:4;%Define a vector x.

y = [0.9 -0.3 -15.5 7 36 -7];

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

plot(x,r)

Save the MATLAB script with name, Chapter8_56830_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.5x50.3x415.5x3+7x2+36x7 in the domain 4x4 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.5x50.3x415.5x3+7x2+36x7 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!

Chapter 8 Solutions

MATLAB: An Introduction with Applications

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.
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
Points, Lines, Planes, Segments, & Rays - Collinear vs Coplanar Points - Geometry; Author: The Organic Chemistry Tutor;https://www.youtube.com/watch?v=dDWjhRfBsKM;License: Standard YouTube License, CC-BY
Naming Points, Lines, and Planes; Author: Florida PASS Program;https://www.youtube.com/watch?v=F-LxiLSSaLg;License: Standard YouTube License, CC-BY