Question
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.
1. Use Matlab to create the following single plot with three subplots. All titles, gridlines, and axis labels should be as sh
The picture below is used as reference to answer the question.
Interacting with Plots: Run the script you used for part 0 to recreate that plot. At the Matlab command prompt enter ginput(1
The last picture (below) is the into to the problem, and is used as reference.
Matlab Plotting Intro: 0. Practice: Write a short test script to use Matlab to plot a line from point (2,1) to point (10,2) E
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 05 0.5 10 time (sec) System Response position (m) 1.5F-velocity (ms) 0.5 0.5 10 time (sec) Notes: . Each subplot has a title. .Open the Matlab help on subplot to see how to get one plot to extend across two columns. The first subplot is an arc, centered at (1,1.5), with radius 2, extending from 459 to 180. Also plotted is asign at the center of the arc. Note that the axes are proportional (not squeezed more horizontally than vertically) and they extend at least 0.5 past where the circle containing the arc would be. The second is y 2 sin x, plotted from 0 to 10 with red dashed lines. Note the axis labels. The third is pos cos 2t and vel-2 sin 2t plotted across two columns. Note that there are axis labels, a legend, and the LineWidth of both plots has been set to 2 for better visibility
Interacting with Plots: Run the script you used for part 0 to recreate that plot. At the Matlab command prompt enter ginput(1) and see what happens when you click on the plot. That should give you some ideas. What if you wanted to be able to put a point on a plot by hand? Add the following lines to the end of your test script: hold on; x,y) ginput (1) plot (x,y,'+' What if you wanted to add some text to your plot by hand? Add the following two lines to the end of your test script: hold on x,y ginput (1) text (x,y, 'My Text Comment) What if the third line above were text (x, y, 'My Text Comment', 'Colorcyan)? You can retrieve a third value from the ginput function. That third value is the mouse button the user pressed. The Matlab help has more details, but button 1 is the left button, button 3 is the right button, and on some hardware, button 2 is the middle button or scroll wheel button. Try x, y ginput (2) plot (x,y,'-
Matlab Plotting Intro: 0. Practice: Write a short test script to use Matlab to plot a line from point (2,1) to point (10,2) Experiment with grid on/off, box on/off, and axis on/off Change the color, line style, and data markers for the line Use axis equal to set the scaling for each axis to the same spacing Know how to change the thickness of a curve's line, using the keyword-value pairs both from the plot command and using the set command. Recall that 'Linewidth' is the keyword of interest for this feature Look at your plot and consider what it is showing you. With axis equal still enabled, change the limits of the x-axis to go from 0 to 11. Does that make it more or less clear that you have drawn a line segment and not part of a larger curve? Use the command line to see what clf (clear figure) does If you try to plot a second line between two different points with another plot command, what happens to the first line? Experiment with hold on and hold off to understand how they work.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code:

clc % subplot of Arc xpoint - 1; ypoint - 1.5; rad - 2; Cb-deg2rad (180); Ca deg2rad(45); theta - Ca:pi/50:cb; al - xpoint +Subplot of System Response te:pi/5e:2*pi; V2*sin(t*2) pcos(t*2); subplot(2, 2, 3) plot(t, p, --b, Linewidth, 2) hold on p

OUTPUT

Arc System Response 4 1.5 3 0.5 2 O0.5 0 10.5 0 0.5 1 1.5 2 2.5 3 System Response 8 1 9 2 0 2 4 6 time(sec) 1.5 tion (m) 1vel

Add a comment
Know the answer?
Add Answer to:
Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any d...
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
  • please help me with this MATLAB CODE and explain to me what each line does and...

    please help me with this MATLAB CODE and explain to me what each line does and what is used for? leave your comments as words, not as pictures. ..................................................................................................................................................................... clear all; close all; % For a script file, you better start with clear all and close all                        % However, for a fucntion, you better NOT to start                        % with them %% End of cell mode example %% Plot function t = 0:0.1:5; x1 = sin(2*5*t); x2 = cos(3*7*t);...

  • N MATLAB: This is an easy problem to demonstrate how polyfit and polyval work! The values...

    N MATLAB: This is an easy problem to demonstrate how polyfit and polyval work! The values in y are basically a sine function on x. You can validate by checking in MATLAB >> x = 0:9 x = 0 1 2 3 4 5 6 7 8 9 >> y = sin(x) y = 0 0.8415 0.9093 0.1411 -0.7568 -0.9589 -0.2794 0.6570 0.9894 0.4121 Now, let us try to see what happens if we use polyfit on the values of...

  • Please help me with this matlab problem, the answer should look like the picture below. Thank...

    Please help me with this matlab problem, the answer should look like the picture below. Thank you %1 Write an anonymous function that will receive data in the form of a plot function handle, x and y vectors, and a handle to a plot function and wil1 produce the plot. For example, a call to the function would look like the following: myPlot (@bar,x,y). x -pǐ : 0.25 : pi; y sin(x); % Piave you anonymous funcyion code here subplot...

  • Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the...

    Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the motion of an object projected into the air at an angle. The object flies in the air until the projectile returns to the horizontal axis (x-axis), where y=0. This MATLAB program should allow the user to try to hit a 2-m diameter target on the x-axis (y=0) by varying conditions, including the lunch direction, the speed of the lunch, the projectile’s size, and the...

  • MATLAB code for a double pendulum. Please explain each lines for these codes pls. -------------------------------------...

    MATLAB code for a double pendulum. Please explain each lines for these codes pls. ---------------------------------------------------------------------------- clc close all clear all %---------Parameters------------------------------------------------------ L1=1; L2=1 ; M_1=2 ; M_2=1; G=9.8; %---------initial condition----------------------------------------------- tspan=30; theta1=3; theta1_prime=0; theta2=2.5; theta2_prime=0; y0=[theta1 theta1_prime theta2 theta2_prime]; [t,y]=ode45(@pend, [0 ,tspan],[ 3 0 2 0]); %---position of mass 1 and mass 2---------------------------------------- x1=L1*sin(y(:,1)); y1=-L1*cos(y(:,1)); x2=L1*sin(y(:,1))+l2*sin(y(:,3)); y2=-L1*cos(y(:,1))-l2*cos(y(:,3)); %------visualizing the result--------------------------------------------- figure(1) plot(x1,y1,'linewidth',2) hold on plot(x2,y2,'r','linewidth',2) h=gca; get(h,'fontSize') set(h,'fontSize',14) xlabel('X','fontSize',14); ylabel('Y','fontSize',14); title('Chaotic Double Pendulum','fontsize',14) fh = figure(1); set(fh, 'color', 'white'); figure(2)...

  • please use matlab Goal: Solve for the loads of the chain saw under different loading conditions....

    please use matlab Goal: Solve for the loads of the chain saw under different loading conditions. The loads on a chain saw as it cuts a log can be represented with the following equations: Ar +B -R cos(60) 0 My-W +By - R sin(60)0 Ar is the reaction load in the x-direction at point A (lb) Ay is the reaction load in the y-direction at point A (Ib) W is the weight of the chain saw (lb) R is the...

  • I need help on the last problem! I provided all the information though, in case it...

    I need help on the last problem! I provided all the information though, in case it was needed. For all of the graphs below use a vector x ranging from 0 to 10 in steps of 0.1. Create two additional vectors using the following formulas: yp=x.^2.5 and ym=x.^(-2.5); [7;5] Plot yp and ym on a single plot controlling the line color and style (your choice). Put a symbol and text string at the point where the two lines cross (Create...

  • I DESPERATELY NEED HELP WITH THIS DIFFERENTIAL EQUATIONS MATLAB ASSIGNMENT IM SUPPOSED TO BE LEARNING BUT...

    I DESPERATELY NEED HELP WITH THIS DIFFERENTIAL EQUATIONS MATLAB ASSIGNMENT IM SUPPOSED TO BE LEARNING BUT WE HAVE A SUB AND HE DIDN'T TEACH IT! ITS EULER AND IMPROVED EULER IN MATLAB! HERE IS THE LINK FOR THE IMAGE FILE THAT SHOWS THE FULL INSTRUCTIONS FOR THE CODE. https://imgur.com/a/gjmypLs Also, here is my code so far that I borrowed form an old assignment but the data is all wrong and the application of the code is slightly different so either...

  • This uses MATLAB code with plotting HW19: Plotting with plot () Due 11:59 pm Monday 1....

    This uses MATLAB code with plotting HW19: Plotting with plot () Due 11:59 pm Monday 1. (10 pts) Write a script that will produce a sine curve and a cosine curve in the same plot, 0 as shown to the right. 06 0.4 0.2 To have two sets of data in one plot, you may plot the first one, then with the command hold on", plot the other. Or, you can learn how to plot two lines with just one...

  • Matlab for engineers 5th edition please help me with this problem with explanation. Consider the following...

    Matlab for engineers 5th edition please help me with this problem with explanation. Consider the following mathematical expression to create a single input-output function. y= −x​3+ x​2 + 2 a)Create a single input-output function that can accept scalar and matrix values. b)Plot the output versus the input, and properly label the axes and add a title. Note: the plot command should be coded inside the function file. c)Calculate y values for x= [−10, 10] with an appropriate increment.

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
ADVERTISEMENT