Sei sulla pagina 1di 1

2/13/16 7:28 PM

MATLAB Command Window

>> x=[1:.1:5];
>> y=[1:.2:10];
>> [X,Y]=meshgrid(x,y);
>> z=cos(X.*Y);
>> subplot(2,6,1);
>> subplot(2,6,1);
>> mesh(x,y,z)
>> z=sin(X.*Y);
>> subplot(2,6,2);
>> mesh(x,y,z);
>> subplot(2,6,3)
>> plot(x,sin(x));
>> title('sin(x)')
>> title('sine(x)')
>> subplot(2,6,4)
>> plot(x,cos(x));
>> title('cos(x)');
>> subplot(2,6,5);
>> plot(x,sin(2*x));
>> title('sine(2x)');
>> subplot(2,6,5);
>> plot(x,cos(2*x));
>> title('cosine(2x)');
>> subplot(2,6,6);
>> plot(x,sin(1\x));
>> title('sine(1\x)');
Warning: Unable to interpret
TeX string "sine(1\x)"
>> title('sine(1 by x)');
>> subplot(2,6,7);
>> plot(x,exp(x));
>> title('exponential(x)');
>> subplot(2,6,8);
>> plot(x,exp(2*x));
>> title('exponential(2x)');
>> subplot(2,6,9);
>> plot(x,exp(1\x));
>> title('exp(1 by x)');
>> subplot(2,6,10);
>> plot(y,exp(1\y));
>> title('exponential(1/y)');
>> g=2*x.^2+6*x+4;
>> m=2*x.^2+6*x+4;
>> subplot(2,6,12);
>> plot(x,m);
>> title('Polynomial Function');
>>

1 of 1

Potrebbero piacerti anche