Question

USE MATLAB 1.) Using subplot make 4 plots on 2 x 2 grid on different axes...

USE MATLAB

1.) Using subplot make 4 plots on 2 x 2 grid on different axes on one figure.
Make 4 plots of sin(x) (each from x = 0 to x = 2pi ) to demonstrate how important it is to use the correct number data points

  1. the top-left plot will use 4 values of x
  2. the top-right plot will use 8 values of x
  3. the bottom left plot will use 16 values of x
  4. the bottom right plot will use 32 values of x
  5. use markers (any kind)
  6. give each plot a title indicating the number of points and label each axis
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

clc
clear all
close all
n=[4,8,16,32];
for i=1:length(n)
x=linspace(0,2*pi,n(i));
subplot(2,2,i)
y=sin(x);
plot(x,y,'-ob');
s=sprintf('For n=%d points',n(i));
title(s);
xlabel('X-AXIS');
ylabel('Y-AXIS');
xlim([0,2*pi]);
ylim([-1,1]);
end

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
USE MATLAB 1.) Using subplot make 4 plots on 2 x 2 grid on different axes...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • ON MATLAB, CREATE THOSE OUTPUTS WITH DIFFERENT VALUES. BE SURE U HAVE TO CHANGE NUMBERS, COLORS,...

    ON MATLAB, CREATE THOSE OUTPUTS WITH DIFFERENT VALUES. BE SURE U HAVE TO CHANGE NUMBERS, COLORS, SHAPES AND LTNE WEIGHTs... AND SHOW YOUR OUTPUT RESULTS AS WELL... the code:: % About Graphs x = 0: pi/40: 4*pi; figure, plot(x, sin(x)) figure, plot([1 1 2 3 3], [0 2 3 2 0]), axis([0 4 0 4]) % for easy plotting: figure, ezplot('tan(x)') % for plotting two graphs on the same axes % it allows to have independent y-axis labels on the...

  • Problem 1 MATLAB A Taylor series is a series expansion of a function f()about a given point a. For one-dimensional real...

    Problem 1 MATLAB A Taylor series is a series expansion of a function f()about a given point a. For one-dimensional real-valued functions, the general formula for a Taylor series is given as ia) (a) (z- a) (z- a)2 + £(a (r- a) + + -a + f(x)(a) (1) A special case of the Taylor series (known as the Maclaurin series) exists when a- 0. The Maclaurin series expansions for four commonly used functions in science and engineering are: sin(x) (-1)"...

  • Don't use fplot command. Matlab code. Write out code please, don't make it a screenshot. 2....

    Don't use fplot command. Matlab code. Write out code please, don't make it a screenshot. 2. Use the subplot command to make two plots of the function f(x) = (x + 1)(x - 2)(2x – 0.25) - et one graph for 0 < x <3 and the other for 3 < x < 6. Use a logarithmic scale for the y-axis. Include a plot title (for each subplot), and label both aris(for each subplot).

  • 4. Compute and plot the following functions on the same page using subplot command (see Appendix)....

    4. Compute and plot the following functions on the same page using subplot command (see Appendix). Be sure to include labels, title, and grid for each plot. Use t 10:0.1: 99]"'. Use a script m-file to do this exercise Show your work (script files and plots) here: 0.1 t2 a) x(12t, 2.3 t +5)e'i vs. t script file:

  • Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble,...

    Matlab Matlab Matlab Matlab, Please solve this problem Problem 4 : Runge's phenomenon For this proble, you wil interpolate the function h(x) = tanh(10x) in I [a, b, through n datapoints (xi, hx with equidistant nodes for several values of n, and observe the behavior of the interpolating polynomial as n increases. You should use the pair of functions polyfit and polyval In your prob40: (a) Interpolate the function tanh(10x) in [-1,1] using a uniform grid of n nodes, where...

  • The equation below represents a linear demand curve. Use the grid (right) for your plots. Write...

    The equation below represents a linear demand curve. Use the grid (right) for your plots. Write all derivations in the space below. l) Plot the demand function on the top set of axes. Your demand function is: Qx = 60000 - 100Px l) Plot the demand function on the top set of axes. 2) The price function is the inverse of the demand function. Write this inverse below. 3) Use the price function to obtain the total revenue function (TR)....

  •    MATLAB SCRIPT PLEASE Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each...

       MATLAB SCRIPT PLEASE Matlab MATH 210 in 2020 Homework Assignment 8- Due 3/25, 11:59PM Each plot should have its own figure associated with it. In all questions, give the figure a title, and label the acis. Save your matlab script as drill 10.m Do not use the fplot command. 1. Plot the function f(x) = (x + 5)2 for -5 <<<10. Include a plot title, and label both aris. 2. Use the subplot command to make two plots of...

  • The equation below represents a linear demand curve. Use the grid (right) for your plots. Write...

    The equation below represents a linear demand curve. Use the grid (right) for your plots. Write all derivations in the space below. 1) Plot the demand function on the top set of axes. Qy = 15000 – 200P, 2) The price function is the inverse of the demand function. Write this inverse below. 3) Use the price function to obtain the total revenue function (TR). Write the TR function below. You will plot TR on the lower set of axes...

  • Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any d...

    Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any difference! The first picture is the question i need to answer. The picture below is used as reference to answer the question. The last picture (below) is the into to the problem, and is used as reference. 1. Use Matlab to create the following single plot with three subplots. All titles, gridlines, and axis labels should be as shown. Arc System Response 15 E...

  • Arrays J = [2 3 4 1 5 6] and K = [3 2 1 4...

    Arrays J = [2 3 4 1 5 6] and K = [3 2 1 4 5 2], create a 3 times 2 subplot where each subplot plots J versus K using bar, loglog, semilogx, semilogy, plot and scatter. Title and label each plot appropriately. Use a grid, but a legend is not necessary. Create an animation of a red circle following a blue sine and cosine waveforms. Use x-axis between 0 to 16*pi with 2000 equally spaced numbers. Create...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT