Calculus MAT1011 Lab 1.pdf - Name ANMOL BANSAL EXPERIMENT...

This preview shows page 1 - 4 out of 4 pages.

Name: ANMOL BANSAL Registration Number: 19BCE0630 SLOT: ELA- L15+ L16 EXPERIMENT 1-A Dated: 24/7/2019 PLOTTING THE CURVE USING SUB-PLOTS Question: Draw the curves y=cosx, y=e x , y=x 3 , y=sinx using subplot with title. Program/Code: x=[0:0.1:2*pi]; subplot(2,2,1); plot(x,cos(x), b* ); title( cosx ); subplot(2,2,2); plot(x,exp(x), k ); title( e^x ); subplot(2,2,3); plot(x,x.^3, g-o ); title( x^3 ); subplot(2,2,4); plot(x,sin(x), m ); title( sinx )
Plot of the 4 graphs using subplot
Name: ANMOL BANSAL Registration Number: 19BCE0630 SLOT: ELA- L15+ L16 EXPERIMENT 1-B Dated: 31/7/2019 3-D PLOTS: USING SURF() AND EZSURF() Question: Using surf and ezsurf plot the curve 3x 2 + 3y 3 Program/Code: 1. Surf Code: x=-1:0.05:1; y=-1:0.05;1; [x,y]=meshgrid(x.y); z=3*x.^2+3*y.^3 surf(x,y,z); colormap cool 2. Ezsurf Code: syms x y z z=3*x.^2+3*y.^3 ezsurf(z) colormap cool
1. Plot of surf code 2. Plot of ezsurf code

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture