EBK MATLAB: AN INTRODUCTION WITH APPLIC
EBK MATLAB: AN INTRODUCTION WITH APPLIC
5th Edition
ISBN: 8220102007642
Author: GILAT
Publisher: YUZU
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 3, Problem 1P
To determine

To calculate:

The value of y in equation y =x2e0·5x+x for the following values of x using element-by-element operations: 3, 2, 1, 0, 1, 2, 3.

Expert Solution & Answer
Check Mark

Answer to Problem 1P

Solution:

The calculated values of y is 5.7769 1.6321 0.6065 1.0000 0.3513 3.2817 7.5183.

Explanation of Solution

The given values of x is 3, 2, 1, 0, 1, 2, 3.

The stated equation is,

y =x2e0·5x+x ……(1)

Substitute the value x=3 in the above equation.

y =x2e0·5x+xy=(3)2e0·5(3)+(3)=5.7769

Substitute the value x=2 in equation (1).

y =x2e0·5x+xy=(2)2e0·5(2)+(2)=1.6321

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

y =x2e0·5x+xy=(1)2e0·5(1)+(1)=0.6065

Substitute the value x=0 in equation (1).

y =x2e0·5x+xy=(0)2e0·5(0)+(0)=1.0000

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

y =x2e0·5x+xy=(1)2e0·5(1)+(1)=0.3513

Substitute the value x=2 in equation (1).

y =x2e0·5x+xy=(2)2e0·5(2)+(2)=3.2817

Substitute the value x=3 in equation (1).

y =x2e0·5x+xy=(3)2e0·5(3)+(3)=7.5183

The calculated values of y is 5.7769 1.6321 0.6065 1.0000 0.3513 3.2817 7.5183.

Write the MATLAB script that calculates the value of y in equation y =x2e0·5x+x for the following values of x using element-by-element operations: 3, 2, 1, 0, 1, 2, 3.

MATLAB Code:

x = -3:3;

% Define the variable x.

y = x.^2-exp(0.5*x)+x

% Calculate the value of the equation.

Save the MATLAB script with the name, chapter3_29864_3_1P.m in the current folder. Execute the script by typing the script name at the command window to get the answer for equation y =x2e0·5x+x for the given values of x : 3, 2, 1, 0, 1, 2, 3.

Result:

EBK MATLAB: AN INTRODUCTION WITH APPLIC, Chapter 3, Problem 1P

Conclusion:

Therefore, the calculated values of y is 5.7769 1.6321 0.6065 1.0000 0.3513 3.2817 7.5183.

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,
Inverse Functions; Author: Professor Dave Explains;https://www.youtube.com/watch?v=9fJsrnE1go0;License: Standard YouTube License, CC-BY