Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Someone help with this matlab program coding ASAP thank you ! g(x)=4cos(x^3) MATLAB provides several commands to customize the look of a plot. These commands

image text in transcribedimage text in transcribed

Someone help with this matlab program coding ASAP thank you !

g(x)=4cos(x^3)

MATLAB provides several commands to customize the look of a plot. These commands include Command title('Title Text) Puts Title Text as the plot title xlabel('Label Text) Puts Label Text as the x-axis label. ylabel('Label Text') Puts Label Text as the y-axis label. axis([xl,xu,yl,yu]) Specifies the axis limits xl The lower limit of the x-axis xu: The upper limit of the x-axis yl The lower limit of the y-axis yu : The upper limit of the y-axis (a) Plot the function g(x) defined in the previous exercise. Title the plot Plot of function g(x), label the x-axis and the y-axis as x and g(x), respectively. Use the following limits for the axes: x-axes: Lower limit: -1.5, Upper limit: 1.5 v-axes: Lower limit: 1, Upper limit: 5 If you wish to have several plots shown at once on different sets of axes, use subplot For example subplot (2,2,1); divides the plot window into 4 parts (subplots) as shown in the figure and specifies the upper left part as the current subplot Plot Window subplot (2,2,1) subplot (2,2,2) subplot (2,2,3 subplot (2,2,4) All subsequent plot, title, xlabel, ylabel, and axis commands will affect that subplot only. You may choose another subplot by executing again the subplot command For example, to choose the lower left subplot you type: subplot (2,2,3); You can restore the original plot setting (i.e. no subplots) by typing clf (b) The complex function f(t) has the form: It is very easy to enter a complex number in MATLAB. As an example, the complex number 1 +] is entered as 1+pi*). Make sure that you do not assign a new value to the predefined variables j and pi Plot in two different subplots the real and imaginary parts of f(t) as a function of time t, fromt-3 to t-3 (seconds) in 0.02 second increments. NOTE: The functions real and imag give the real and the imaginary part of a complex number, respectively. Type help real or help imag for more information. (c) Plot in two different subplots the magnitude and phase of f(t). NOTE: The functions abs and angle give the magnitude and the phase of a complex number, respectively. Type help abs or help angle for more information

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

a valuing of personal and psychological privacy;

Answered: 1 week ago