0% found this document useful (0 votes)
17 views

Z Peaks (25) Contour (Z, 16) Colormap (HSV) : Contour Plot of Plots Slice

The document provides instructions for generating several plots in MATLAB: 1) It generates a contour plot of a peaks function and applies a colormap. 2) It defines variables for a 3D meshgrid and plots a slice of an exponential function. 3) It plots sine and cosine functions against time and their sum. 4) It generates stem plots of impulse and unit step functions over a discrete time range.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Z Peaks (25) Contour (Z, 16) Colormap (HSV) : Contour Plot of Plots Slice

The document provides instructions for generating several plots in MATLAB: 1) It generates a contour plot of a peaks function and applies a colormap. 2) It defines variables for a 3D meshgrid and plots a slice of an exponential function. 3) It plots sine and cosine functions against time and their sum. 4) It generates stem plots of impulse and unit step functions over a discrete time range.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Contour Plot of Plots Slice

>> z=peaks(25); >> [x,y,z]=meshgrid(-2:0.2:2,-


2:0.2:2,-2:0.2:2);
>> contour(z,16);
>> v=x.*exp(-x.^2-y.^2-z.^2);
>> colormap(hsv)
>> slice(v,[5 15 21],21,[1 10])

>> axis([0 21 0 21 0 21]);

>> colormap(jet)

>> t=-2*pi: pi/100 :2*pi; 𝑫𝒊𝒔𝒄𝒓𝒆𝒕𝒆 𝑻𝒊𝒎𝒆 𝑺𝒆𝒒𝒖𝒆𝒏𝒄𝒆

>> x= cos (t); >> n=[-5:4];

>> y= sin (t); >> x=[-5,-4,-3,-2,-


1,0,1,2,3,4];
>> z= x.^2 + y.^2;
>> stem(n,x)
>> plot(t,x);
X1[n] =𝜹[𝒏]𝒐𝒗𝒆𝒓 − 𝟏𝟎 ≤ X1[n] =𝒖[𝒏]𝒐𝒗𝒆𝒓 − 𝟏𝟎 ≤
𝒏 ≤ 𝟏𝟎 𝒏 ≤ 𝟏𝟎

>> n=[-10:10]; >> stem(n,x)

>> x=[(n-0)==0]; >> x=[(n-0)>=0];

>> stem(n,x) >> stem(n,x)

You might also like