Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Define x
- x= linspace(-1,1,70);
- % Define y1
- y1= ((sin((pi)*x))/1+(x.^2));
- %Define y2
- y2= (1/1+(x.^2));
- % Define y3
- y3= -1/1+(x.^2);
- % Plot y1
- plot (x,y1,'b-');
- hold on
- % Plot y2
- plot (x,y2,'r--');
- % Plot y3
- plot (x,y3,'g--');
- hold off
- % Add Legend
- legend('y1 equation','y2 equation','y3 equation');
- % Label X-axis
- xlabel('x axis')
- % Label Y-axis
- ylabel('y axis')
- % Add title
- title(' Y Function Graph ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement