Ask user to enter vector x to evaluate and plot the following two functions in two different figures. Choose different colors for each of the plots and choose suitable labels for them. f(x) = 2x čos(6x) f2(x) = (10 + 2sin(2000r x)) sin(1070007 x) Note that argument of trigonometric functions is in radians. Sample Output >> exercise10 Enter a vector x to evaluate and plot f1(x) and f2 (x): 0:pi/100:5*pi Figure 1 Figure 2 Ele Edit View nsert Tools Desktop Window Help Elle Edit yiew sert Tools Desktop Window Help ,00 = 2°cos(ta) 400 = (10 + 2sin(2000nun( 107000a) 500 15 400 10 300 200 100 3. 0 -100 200 300 -10 400 500 10 12 14 16 2. 10 12 14 16
Ask user to enter vector x to evaluate and plot the following two functions in two different figures. Choose different colors for each of the plots and choose suitable labels for them. f(x) = 2x čos(6x) f2(x) = (10 + 2sin(2000r x)) sin(1070007 x) Note that argument of trigonometric functions is in radians. Sample Output >> exercise10 Enter a vector x to evaluate and plot f1(x) and f2 (x): 0:pi/100:5*pi Figure 1 Figure 2 Ele Edit View nsert Tools Desktop Window Help Elle Edit yiew sert Tools Desktop Window Help ,00 = 2°cos(ta) 400 = (10 + 2sin(2000nun( 107000a) 500 15 400 10 300 200 100 3. 0 -100 200 300 -10 400 500 10 12 14 16 2. 10 12 14 16
Introductory Circuit Analysis (13th Edition)
13th Edition
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:Robert L. Boylestad
Chapter1: Introduction
Section: Chapter Questions
Problem 1P: Visit your local library (at school or home) and describe the extent to which it provides literature...
Related questions
Question

Transcribed Image Text:MATLAB Tutorial
EXERCISE 10
Ask user to enter vector x to evaluate and plot the following two functions in two different
figures. Choose different colors for each of the plots and choose suitable labels for them.
f(x) = 2x čos(6x)
f2(x) = (10 + 2sin(2000r x)) sin(1070007 x)
%3D
Note that argument of trigonometric functions is in radians.
Sample Output
>> exercise10
Enter a vector x to evaluate and plot f1 (x) and f2 (x): 0:pi/100:5*pi
Figure 1
Figure 2
Eile Edit View Insert Tools Desktop Window Help
Elle Edit View Insert Tools Desktop Window Help
1,00 = 2°cos(ax)
L0) = (10 + 2sin(2000x))sin(107000x)
500
400
300
200
100
-100
-200
-300
-10
400
500
10
12
14
16
Expert Solution

Step 1
clc;clear all;format compact
x=input('Enter a vector x to evaluate and plot f1(x) and f2(x): '); %Asks user to input x
f1=2.*x.^2.*cos(6.*x); %f1(x)
f2=(10+2.*sin(2000.*pi.*x)).*sin(10700.*pi.*x); %f2(x)
%Plots f1(x) and adds title label
plot(x,f1,'-k','LineWidth',2);xlabel('x');ylabel('f1(x)');title('Plot of f1(x)');
figure()
%Plots f2(x) in new figure.
plot(x,f2,'-r','LineWidth',2);xlabel('x');ylabel('f2(x)');title('Plot of f2(x)');
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images

Knowledge Booster
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

Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:
9780133923605
Author:
Robert L. Boylestad
Publisher:
PEARSON

Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:
9781337900348
Author:
Stephen L. Herman
Publisher:
Cengage Learning

Programmable Logic Controllers
Electrical Engineering
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education

Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:
9780133923605
Author:
Robert L. Boylestad
Publisher:
PEARSON

Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:
9781337900348
Author:
Stephen L. Herman
Publisher:
Cengage Learning

Programmable Logic Controllers
Electrical Engineering
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education

Fundamentals of Electric Circuits
Electrical Engineering
ISBN:
9780078028229
Author:
Charles K Alexander, Matthew Sadiku
Publisher:
McGraw-Hill Education

Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:
9780134746968
Author:
James W. Nilsson, Susan Riedel
Publisher:
PEARSON

Engineering Electromagnetics
Electrical Engineering
ISBN:
9780078028151
Author:
Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:
Mcgraw-hill Education,