Concept explainers
(a)
A user-defined MATLAB
Answer to Problem 1P
Solution:
The value of
Explanation of Solution
The given function is,
Solve the above equation for
Solve the above equation for
Write the MATLAB code to determine the user-defined MATLAB function for the given math function
MATLAB Code:
Function file
function y = Chapter7_29864_7_1P(x)
y = (-0.2*x.^3+7*x.^2).*exp(-0.3*x);
Script file
%...............................Script file.....................
x = [-1.5 5];
y = Chapter7_29864_7_1P(x);
disp('The test values for y(x) are:')
disp(y)
Save the MATLAB script with name, Chapter7_29864_7_1P.m in the current folder. Execute the script by typing the script name at the command window to get the code that determines the user-defined MATLAB function for the given math function
Result:
Conclusion:
Therefore, the value of
(b)
To make:
A plot of the given function
Answer to Problem 1P
Solution:
The program is stated as follows.
Explanation of Solution
The given function is,
Write the MATLAB code to make the plot of the given function
MATLAB Code:
Function file
function y = Chapter7_29864_7_1P(x)
y = (-0.2*x.^3+7*x.^2).*exp(-0.3*x);
Script file
x = -2:0.1:6;
plot(x,Chapter7_29864_7_1P(x));
title('y(x) = (-0.2x^3 + 7x^2)e^{-0.3x}')
xlabel('x')
ylabel('y')
Save the MATLAB script with name, Chapter7_29864_7_1P.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
Result:
Conclusion:
Therefore, the program is stated above.
Want to see more full solutions like this?
Chapter 7 Solutions
MATLAB: An Introduction with Applications
- Homework Use graphical approach to find VGSQ, IDQ and use the mathematical approach to find VDS, VS, VG, VD. a. Rs b. Rs = = 100 Ω. 10 ΚΩ. 1 ΜΩ m 20 V 1 3.3 ΚΩ D G + VGS Rs IDss= 10 mA Vp= -4 V ID= IDSS | VGs=Vp/2 4 VDS =V DD-ID(RS+RD) Vs = IDRS V D=V +Vs DSarrow_forwardDon't use ai to answer I will report you answerarrow_forwardDo problem 3.4aarrow_forward
- Write a PIC16F877A program that flash ON the 8-LED's connected to port-B by using two switches connected to port-D (Do & D₁) as shown in figure below, according to the following scenarios: (Hint: Use 500ms delay for each case with 4MHz frequency) 1. When Do=1 then B₁,B3,B7 are ON. 2. When Do 0 then Bo,B2, B4, B5, B6 are ON. 3. When D=1 then B4, B5, B6, B7 are ON. 4. When D₁=0 then B0,B1,B2,B3 are ON. U1 OSC1/CLION 33 OSC2/CLKOUT T 34 5 U2 20 10 35 3 18 10 - 30 -ou-un RB2 2 RA1/AN1 PA3/AN3VREF+ RA4/TOCKIC1OUT RACIANO 0RB3PGM 37 33 4 17 5 10 RB4 39 RA2/ANZ/VREF-CVREF RB5 15 39 7 14 RB6PGC 40 13 RB7/PGO RAS/AN4/SS/C2OUT + 15 RCOT1OSOTICK 10 RECANARD RE1/AN/R REZ/ANTICS ✓ MCLR/Vpp/THV RC2/CCP1 RC3/SCK/SCL RCA/SOISDA RC5/S00 RCB/TX/CK 10 RC1/T10SUCCP2 17 LED-BARGRAPH-RED RC7/RX/DT ROOPSPO RD1/PSP1 R02/PSP2 RD3/PSP3 ROUPSP4 RD5PSP5 ROOPSPO RO7/PSP7 PIC16F877A +5V R2 100R R1 100Rarrow_forwardDon't use ai to answer I will report you answerarrow_forwardIf V(t) = 99e-58t mV and is (0) is (t) for t>0 Vs is + is(t) = ☐ mA 8 mF =-80 mA, find 24 mF 20 mHarrow_forward
- Introductory Circuit Analysis (13th Edition)Electrical EngineeringISBN:9780133923605Author:Robert L. BoylestadPublisher:PEARSONDelmar's Standard Textbook Of ElectricityElectrical EngineeringISBN:9781337900348Author:Stephen L. HermanPublisher:Cengage LearningProgrammable Logic ControllersElectrical EngineeringISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
- Fundamentals of Electric CircuitsElectrical EngineeringISBN:9780078028229Author:Charles K Alexander, Matthew SadikuPublisher:McGraw-Hill EducationElectric Circuits. (11th Edition)Electrical EngineeringISBN:9780134746968Author:James W. Nilsson, Susan RiedelPublisher:PEARSONEngineering ElectromagneticsElectrical EngineeringISBN:9780078028151Author:Hayt, William H. (william Hart), Jr, BUCK, John A.Publisher:Mcgraw-hill Education,