MATLAB: AN INTRODUCTION WITH APPLICATIO
MATLAB: AN INTRODUCTION WITH APPLICATIO
6th Edition
ISBN: 9781119626596
Author: GILAT
Publisher: WILEY
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 7, Problem 1P
To determine

(a)

A user-defined MATLAB function for the given math function y(x)=0.6x3e0.47x+1.5x2e0.6x; the value of y(2) and y(4) using this function. (Write the function such that x can be a vector.)

Expert Solution
Check Mark

Answer to Problem 1P

Solution:

The value of y(2) is 16.8487 and y(4) is 2.5434.

Explanation of Solution

The given function is,

    y(x)=0.6x3e0.47x+1.5x2e0.6x

Solve the above equation for y(2).

    y(x)=0.6x3e0.47x+1.5x2e0.6xy(2)=0.6(2)3e0.47( 2)+1.5(2)2e0.6( 2)=16.8487

Solve the above equation for y(4).

    y(x)=0.6x3e0.47x+1.5x2e0.6xy(4)=0.6(4)3e0.47(4)+1.5(4)2e0.6(4)=2.5434

Write the MATLAB code to determine the user-defined MATLAB function for the given math function y(x)=0.6x3e0.47x+1.5x2e0.6x and calculate the value of y(2) and y(4) using this function.

MATLAB Code:

Function file

function y = Chapter7_56830_7_1P(x)

y = (0.6.*x.*exp(-0.47.*x))+(1.5.*x.^2.*exp(-0.6.*x));

Script file

x = [-2 4];

y = Chapter7_56830_7_1P(x);

disp('The test values for y(x) are:')

disp(y)

Save the MATLAB script with name, Chapter7_56830_7_1Pa.m in the current folder. Execute the script by typing the script name at the command window to get the code to make a 3-D plot (shown in the figure) that shows the trajectory of the ball during the first five bounces in which the position of ball is given as a function of time and the velocities is given in the x and y direction.

Result:

MATLAB: AN INTRODUCTION WITH APPLICATIO, Chapter 7, Problem 1P , additional homework tip  1

Conclusion:

Therefore, the value of y(2) is 16.8487 and y(4) is 2.5434.

To determine

(b)

To make:

A plot of the given function y(x) for 4x8.

Expert Solution
Check Mark

Answer to Problem 1P

Solution:

The program is stated as follows.

Explanation of Solution

The given function is,

    y(x)=0.6x3e0.47x+1.5x2e0.6x

Write the MATLAB code to make a plot of the given function y(x) for 4x8.

MATLAB Code:

Function file

function y = Chapter7_56830_7_1P(x)

y = (0.6.*x.*exp(-0.47.*x))+(1.5.*x.^2.*exp(-0.6.*x));

Script file

x = -4:.1:8;

plot(x,Chapter7_56830_7_1P(x));

title('y(x) = (0.6.*x.*exp(-0.47.*x))+(1.5.*x.^2.*exp(-0.6.*x))')

xlabel('x-->')

ylabel('y-->')

Save the MATLAB script with name, Chapter7_56830_7_1Pb.m in the current folder. Execute the script by typing the script name at the command window to get the code to make a plot of the given function y(x) for 4x8.

Result:

MATLAB: AN INTRODUCTION WITH APPLICATIO, Chapter 7, Problem 1P , additional homework tip  2

Conclusion:

Therefore, the required program 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
Let X represent the full height of a certain species of tree. Assume that X has a normal probability distribution with mean 203.8 ft and standard deviation 43.8 ft. You intend to measure a random sample of n = 211trees. The bell curve below represents the distribution of these sample means. The scale on the horizontal axis (each tick mark) is one standard error of the sampling distribution. Complete the indicated boxes, correct to two decimal places. Image attached. I filled in the yellow boxes and am not sure why they are wrong. There are 3 yellow boxes filled in with values 206.82;  209.84;   212.86.
Could you please answer this question using excel.Thanks
Questions An insurance company's cumulative incurred claims for the last 5 accident years are given in the following table: Development Year Accident Year 0 2018 1 2 3 4 245 267 274 289 292 2019 255 276 288 294 2020 265 283 292 2021 263 278 2022 271 It can be assumed that claims are fully run off after 4 years. The premiums received for each year are: Accident Year Premium 2018 306 2019 312 2020 318 2021 326 2022 330 You do not need to make any allowance for inflation. 1. (a) Calculate the reserve at the end of 2022 using the basic chain ladder method. (b) Calculate the reserve at the end of 2022 using the Bornhuetter-Ferguson method. 2. Comment on the differences in the reserves produced by the methods in Part 1.

Chapter 7 Solutions

MATLAB: AN INTRODUCTION WITH APPLICATIO

Ch. 7 - Write a user-defined function that calculates...Ch. 7 - Write a user-defined MATLAB function that...Ch. 7 - Write a user-defined MATLAB function that...Ch. 7 - Write a user-defined MATLAB function that...Ch. 7 - Prob. 15PCh. 7 - The area of a triangle ABC can be calculated by:...Ch. 7 - As shown in the figure, the area of a convex...Ch. 7 - Write a user-defined function that determines the...Ch. 7 - Write a user-defined MATLAB function that converts...Ch. 7 - Write a user-defined function that plots a...Ch. 7 - Write a user-defined function that plots an...Ch. 7 - Prob. 22PCh. 7 - Write a user-defined function that determines if a...Ch. 7 - The harmonic mean H of a set of n positive numbers...Ch. 7 - Write a user-defined function that determines the...Ch. 7 - Write a user-defined function that determines the...Ch. 7 - Write a user-defined function that sorts the...Ch. 7 - Write a user-defined function that sorts the...Ch. 7 - Write a user-defined MATLAB function that finds...Ch. 7 - Write a user-defined MATLAB function that...Ch. 7 - The shortest distance between two points on the...Ch. 7 - Delta rosette is a set of three strain gages...Ch. 7 - In a lottery the player has to select several...Ch. 7 - 34. The Taylor series expansion for sin x about x...Ch. 7 - Write a user-defined function that determines the...Ch. 7 - The area moment of inertia Ixe of a rectangle...Ch. 7 - The simple RC high-pass filter shown in the figure...Ch. 7 - A circuit that filters out a certain frequency is...Ch. 7 - The first derivative df(x)dx a function f(x) at a...Ch. 7 - In lottery the player has to guess correctly r...
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
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