EBK MATLAB: AN INTRODUCTION WITH APPLIC
EBK MATLAB: AN INTRODUCTION WITH APPLIC
5th Edition
ISBN: 8220102007642
Author: GILAT
Publisher: YUZU
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:

EBK MATLAB: AN INTRODUCTION WITH APPLIC, 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!
Knowledge Booster
Background pattern image
Electrical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:PEARSON
Text book image
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Electrical Engineering
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Text book image
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:9780078028229
Author:Charles K Alexander, Matthew Sadiku
Publisher:McGraw-Hill Education
Text book image
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:9780134746968
Author:James W. Nilsson, Susan Riedel
Publisher:PEARSON
Text book image
Engineering Electromagnetics
Electrical Engineering
ISBN:9780078028151
Author:Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:Mcgraw-hill Education,
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