
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

function Assignment % Assignment2 The program does homework assignment 2 for CVEN 302 % % Synopsis: Creates a plot of three sets of data % % Input: No input values % % Output: plot of the data sets t = linspace(-4pi,4pi,50); y1 = sin(3t/2); y2 = cos(5t/3); y3 = y1.y1 + 3y1.y2 - y2.y2.y2; plot(t,y1,'gs--',t,y2,'r-',t,y3,'+-'); axis([-15 15 -5 5]); legend('y1','y2','y3'); xlabel('X values'); ylabel('Y values'); title('Homework Assignment 2');