Write Function Plotxy Plot Data Points Represented X Y Vectors Passed Input Arguments Ifa Q28733809

FOR MATLAB PROGRAMMING
. Write a function plotxy that will plot data points represented by x and y vectors which are passed as input arguments. Ifa third argument is passed, it is a line width for the plot, and if a fourth argument is also passed, it is a color. The plot title will include the total number of arguments passed to the function. Here is an example of calling the function and the resulting plot: >> x=linspace (-2-pi,2*pi, 50); >y cos (x) >plotxy (x,y,12, b) 4 Arguments 0.8 0.6 0.4 0.2 -0.2 0.4 0.6. Write a function plotxy that will plot data points represented by x and y vectors which are passed as input arguments. Ifa third argument is passed, it is a line width for the plot, and if a fourth argument is also passed, it is a color. The plot title will include the total number of arguments passed to the function. Here is an example of calling the function and the resulting plot: >> x=linspace (-2-pi,2*pi, 50); >y cos (x) >plotxy (x,y,12, ‘b’) 4 Arguments 0.8 0.6 0.4 0.2 -0.2 0.4 0.6 Show transcribed image text

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *