Powered By Blogger

Flower

I Love Beautiful Garden

Crips Flower Windows Box

I Love Beautiful Garden

Pinky

I Love Beautiful Garden

Smilling FLower

I Love Beautiful Garden

Romantic White

I Love Beautiful Garden

Rabu, 30 April 2014

Praktikum Aplikom Matlab (Integral dan Grafik 3D)

Berikut merupakan soal dan jawaban sesi Praktikum Aplikom Matlab (Integral dan Grafik 3D) Kelas Pendidikan Matematika C 2013 (Universitas Negeri Yogyakarta)

Praktikum Aplikom Matlab (Integral dan Grafik 3D)

Selasa, 29 April 2014

Praktikum 3D

 2D


>> f=inline('-x(1).*x(2).*exp(-2.*(x(1).^2+x(2).^2))');
>> x=-2:2;y=x;
>> [X,Y]=meshgrid(x,y);
>> Z=-X.*Y.*exp(-2.*((X.^2)+(Y.^2)))

Z =

   -0.0000   -0.0001         0    0.0001    0.0000
   -0.0001   -0.0183         0    0.0183    0.0001
         0         0         0         0         0
    0.0001    0.0183         0   -0.0183   -0.0001
    0.0000    0.0001         0   -0.0001   -0.0000

>> meshc(X,Y,Z)

>> f1=inline('-(-x(1).*x(2).*exp(-2.*(x(1).^2+x(2).^2)))');

>> [x12min,fval]=fminsearch(f,[-1,-1])

x12min =

   -0.5000   -0.5000


fval =

   -0.0920

>> [x12min,fval]=fminsearch(f,[1,1])

x12min =

    0.5000    0.5000


fval =

   -0.0920

>> f1=inline('-(-x(1).*x(2).*exp(-2.*(x(1).^2+x(2).^2)))');

>> [x12min]=fminsearch(f1,[1,-1])

x12min =

    0.5000   -0.5000

>> Z2=f(x12min)

Z2 =

    0.0920

>> [x12min]=fminsearch(f1,[-1,1])

x12min =

   -0.5000    0.5000

>> Z3=f(x12min)

Z3 =

    0.0920



 3D


>> f=inline('-x(1).*x(2).*exp(-2.*(x(1).^2+x(2).^2))');
>> x=-2:0.1:2;y=x;
>> [X,Y]=meshgrid(x,y);
>> Z=-X.*Y.*exp(-2.*((X.^2)+(Y.^2)))

Z =

  Columns 1 through 7

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0001
   -0.0000   -0.0000   -0.0000   -0.0000   -0.0001   -0.0001   -0.0001
   -0.0000   -0.0000   -0.0000   -0.0001   -0.0001   -0.0002   -0.0003
   -0.0000   -0.0000   -0.0000   -0.0001   -0.0002   -0.0003   -0.0005
   -0.0000   -0.0000   -0.0001   -0.0001   -0.0003   -0.0005   -0.0008
   -0.0000   -0.0001   -0.0001   -0.0002   -0.0004   -0.0007   -0.0012
   -0.0000   -0.0001   -0.0002   -0.0004   -0.0006   -0.0011   -0.0019
   -0.0001   -0.0001   -0.0003   -0.0005   -0.0009   -0.0016   -0.0027
   -0.0001   -0.0002   -0.0004   -0.0007   -0.0013   -0.0023   -0.0038
   -0.0001   -0.0002   -0.0005   -0.0009   -0.0017   -0.0030   -0.0049
   -0.0001   -0.0003   -0.0006   -0.0012   -0.0021   -0.0037   -0.0062
   -0.0002   -0.0004   -0.0007   -0.0014   -0.0025   -0.0044   -0.0073
   -0.0002   -0.0004   -0.0008   -0.0015   -0.0028   -0.0049   -0.0081
   -0.0002   -0.0004   -0.0008   -0.0016   -0.0029   -0.0051   -0.0084
   -0.0002   -0.0004   -0.0008   -0.0015   -0.0028   -0.0048   -0.0081
   -0.0002   -0.0003   -0.0007   -0.0013   -0.0024   -0.0042   -0.0070
   -0.0001   -0.0003   -0.0005   -0.0010   -0.0018   -0.0031   -0.0051
   -0.0001   -0.0001   -0.0003   -0.0005   -0.0009   -0.0016   -0.0027
         0         0         0         0         0         0         0
    0.0001    0.0001    0.0003    0.0005    0.0009    0.0016    0.0027
    0.0001    0.0003    0.0005    0.0010    0.0018    0.0031    0.0051
    0.0002    0.0003    0.0007    0.0013    0.0024    0.0042    0.0070
    0.0002    0.0004    0.0008    0.0015    0.0028    0.0048    0.0081
    0.0002    0.0004    0.0008    0.0016    0.0029    0.0051    0.0084
    0.0002    0.0004    0.0008    0.0015    0.0028    0.0049    0.0081
    0.0002    0.0004    0.0007    0.0014    0.0025    0.0044    0.0073
    0.0001    0.0003    0.0006    0.0012    0.0021    0.0037    0.0062
    0.0001    0.0002    0.0005    0.0009    0.0017    0.0030    0.0049
    0.0001    0.0002    0.0004    0.0007    0.0013    0.0023    0.0038
    0.0001    0.0001    0.0003    0.0005    0.0009    0.0016    0.0027
    0.0000    0.0001    0.0002    0.0004    0.0006    0.0011    0.0019
    0.0000    0.0001    0.0001    0.0002    0.0004    0.0007    0.0012
    0.0000    0.0000    0.0001    0.0001    0.0003    0.0005    0.0008
    0.0000    0.0000    0.0000    0.0001    0.0002    0.0003    0.0005
    0.0000    0.0000    0.0000    0.0001    0.0001    0.0002    0.0003
    0.0000    0.0000    0.0000    0.0000    0.0001    0.0001    0.0001
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0001
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000

  Columns 8 through 14

   -0.0000   -0.0000   -0.0001   -0.0001   -0.0001   -0.0001   -0.0002
   -0.0001   -0.0001   -0.0001   -0.0002   -0.0002   -0.0003   -0.0004
   -0.0001   -0.0002   -0.0003   -0.0004   -0.0005   -0.0006   -0.0007
   -0.0002   -0.0004   -0.0005   -0.0007   -0.0009   -0.0012   -0.0014
   -0.0004   -0.0006   -0.0009   -0.0013   -0.0017   -0.0021   -0.0025
   -0.0007   -0.0011   -0.0016   -0.0023   -0.0030   -0.0037   -0.0044
   -0.0012   -0.0019   -0.0027   -0.0038   -0.0049   -0.0062   -0.0073
   -0.0020   -0.0030   -0.0043   -0.0060   -0.0079   -0.0098   -0.0116
   -0.0030   -0.0045   -0.0066   -0.0091   -0.0120   -0.0150   -0.0177
   -0.0043   -0.0066   -0.0096   -0.0132   -0.0174   -0.0218   -0.0257
   -0.0060   -0.0091   -0.0132   -0.0183   -0.0241   -0.0301   -0.0356
   -0.0079   -0.0120   -0.0174   -0.0241   -0.0317   -0.0396   -0.0468
   -0.0098   -0.0150   -0.0218   -0.0301   -0.0396   -0.0495   -0.0584
   -0.0116   -0.0177   -0.0257   -0.0356   -0.0468   -0.0584   -0.0690
   -0.0129   -0.0197   -0.0286   -0.0395   -0.0520   -0.0650   -0.0767
   -0.0134   -0.0204   -0.0297   -0.0410   -0.0540   -0.0675   -0.0797
   -0.0129   -0.0196   -0.0284   -0.0393   -0.0517   -0.0646   -0.0763
   -0.0111   -0.0169   -0.0245   -0.0339   -0.0446   -0.0557   -0.0658
   -0.0082   -0.0124   -0.0181   -0.0250   -0.0329   -0.0411   -0.0485
   -0.0043   -0.0066   -0.0096   -0.0133   -0.0175   -0.0218   -0.0258
         0         0         0         0         0         0         0
    0.0043    0.0066    0.0096    0.0133    0.0175    0.0218    0.0258
    0.0082    0.0124    0.0181    0.0250    0.0329    0.0411    0.0485
    0.0111    0.0169    0.0245    0.0339    0.0446    0.0557    0.0658
    0.0129    0.0196    0.0284    0.0393    0.0517    0.0646    0.0763
    0.0134    0.0204    0.0297    0.0410    0.0540    0.0675    0.0797
    0.0129    0.0197    0.0286    0.0395    0.0520    0.0650    0.0767
    0.0116    0.0177    0.0257    0.0356    0.0468    0.0584    0.0690
    0.0098    0.0150    0.0218    0.0301    0.0396    0.0495    0.0584
    0.0079    0.0120    0.0174    0.0241    0.0317    0.0396    0.0468
    0.0060    0.0091    0.0132    0.0183    0.0241    0.0301    0.0356
    0.0043    0.0066    0.0096    0.0132    0.0174    0.0218    0.0257
    0.0030    0.0045    0.0066    0.0091    0.0120    0.0150    0.0177
    0.0020    0.0030    0.0043    0.0060    0.0079    0.0098    0.0116
    0.0012    0.0019    0.0027    0.0038    0.0049    0.0062    0.0073
    0.0007    0.0011    0.0016    0.0023    0.0030    0.0037    0.0044
    0.0004    0.0006    0.0009    0.0013    0.0017    0.0021    0.0025
    0.0002    0.0004    0.0005    0.0007    0.0009    0.0012    0.0014
    0.0001    0.0002    0.0003    0.0004    0.0005    0.0006    0.0007
    0.0001    0.0001    0.0001    0.0002    0.0002    0.0003    0.0004
    0.0000    0.0000    0.0001    0.0001    0.0001    0.0001    0.0002

  Columns 15 through 21

   -0.0002   -0.0002   -0.0002   -0.0002   -0.0001   -0.0001         0
   -0.0004   -0.0004   -0.0004   -0.0003   -0.0003   -0.0001         0
   -0.0008   -0.0008   -0.0008   -0.0007   -0.0005   -0.0003         0
   -0.0015   -0.0016   -0.0015   -0.0013   -0.0010   -0.0005         0
   -0.0028   -0.0029   -0.0028   -0.0024   -0.0018   -0.0009         0
   -0.0049   -0.0051   -0.0048   -0.0042   -0.0031   -0.0016         0
   -0.0081   -0.0084   -0.0081   -0.0070   -0.0051   -0.0027         0
   -0.0129   -0.0134   -0.0129   -0.0111   -0.0082   -0.0043         0
   -0.0197   -0.0204   -0.0196   -0.0169   -0.0124   -0.0066         0
   -0.0286   -0.0297   -0.0284   -0.0245   -0.0181   -0.0096         0
   -0.0395   -0.0410   -0.0393   -0.0339   -0.0250   -0.0133         0
   -0.0520   -0.0540   -0.0517   -0.0446   -0.0329   -0.0175         0
   -0.0650   -0.0675   -0.0646   -0.0557   -0.0411   -0.0218         0
   -0.0767   -0.0797   -0.0763   -0.0658   -0.0485   -0.0258         0
   -0.0853   -0.0886   -0.0848   -0.0732   -0.0539   -0.0286         0
   -0.0886   -0.0920   -0.0881   -0.0760   -0.0560   -0.0297         0
   -0.0848   -0.0881   -0.0844   -0.0728   -0.0536   -0.0285         0
   -0.0732   -0.0760   -0.0728   -0.0628   -0.0463   -0.0246         0
   -0.0539   -0.0560   -0.0536   -0.0463   -0.0341   -0.0181         0
   -0.0286   -0.0297   -0.0285   -0.0246   -0.0181   -0.0096         0
         0         0         0         0         0         0         0
    0.0286    0.0297    0.0285    0.0246    0.0181    0.0096         0
    0.0539    0.0560    0.0536    0.0463    0.0341    0.0181         0
    0.0732    0.0760    0.0728    0.0628    0.0463    0.0246         0
    0.0848    0.0881    0.0844    0.0728    0.0536    0.0285         0
    0.0886    0.0920    0.0881    0.0760    0.0560    0.0297         0
    0.0853    0.0886    0.0848    0.0732    0.0539    0.0286         0
    0.0767    0.0797    0.0763    0.0658    0.0485    0.0258         0
    0.0650    0.0675    0.0646    0.0557    0.0411    0.0218         0
    0.0520    0.0540    0.0517    0.0446    0.0329    0.0175         0
    0.0395    0.0410    0.0393    0.0339    0.0250    0.0133         0
    0.0286    0.0297    0.0284    0.0245    0.0181    0.0096         0
    0.0197    0.0204    0.0196    0.0169    0.0124    0.0066         0
    0.0129    0.0134    0.0129    0.0111    0.0082    0.0043         0
    0.0081    0.0084    0.0081    0.0070    0.0051    0.0027         0
    0.0049    0.0051    0.0048    0.0042    0.0031    0.0016         0
    0.0028    0.0029    0.0028    0.0024    0.0018    0.0009         0
    0.0015    0.0016    0.0015    0.0013    0.0010    0.0005         0
    0.0008    0.0008    0.0008    0.0007    0.0005    0.0003         0
    0.0004    0.0004    0.0004    0.0003    0.0003    0.0001         0
    0.0002    0.0002    0.0002    0.0002    0.0001    0.0001         0

  Columns 22 through 28

    0.0001    0.0001    0.0002    0.0002    0.0002    0.0002    0.0002
    0.0001    0.0003    0.0003    0.0004    0.0004    0.0004    0.0004
    0.0003    0.0005    0.0007    0.0008    0.0008    0.0008    0.0007
    0.0005    0.0010    0.0013    0.0015    0.0016    0.0015    0.0014
    0.0009    0.0018    0.0024    0.0028    0.0029    0.0028    0.0025
    0.0016    0.0031    0.0042    0.0048    0.0051    0.0049    0.0044
    0.0027    0.0051    0.0070    0.0081    0.0084    0.0081    0.0073
    0.0043    0.0082    0.0111    0.0129    0.0134    0.0129    0.0116
    0.0066    0.0124    0.0169    0.0196    0.0204    0.0197    0.0177
    0.0096    0.0181    0.0245    0.0284    0.0297    0.0286    0.0257
    0.0133    0.0250    0.0339    0.0393    0.0410    0.0395    0.0356
    0.0175    0.0329    0.0446    0.0517    0.0540    0.0520    0.0468
    0.0218    0.0411    0.0557    0.0646    0.0675    0.0650    0.0584
    0.0258    0.0485    0.0658    0.0763    0.0797    0.0767    0.0690
    0.0286    0.0539    0.0732    0.0848    0.0886    0.0853    0.0767
    0.0297    0.0560    0.0760    0.0881    0.0920    0.0886    0.0797
    0.0285    0.0536    0.0728    0.0844    0.0881    0.0848    0.0763
    0.0246    0.0463    0.0628    0.0728    0.0760    0.0732    0.0658
    0.0181    0.0341    0.0463    0.0536    0.0560    0.0539    0.0485
    0.0096    0.0181    0.0246    0.0285    0.0297    0.0286    0.0258
         0         0         0         0         0         0         0
   -0.0096   -0.0181   -0.0246   -0.0285   -0.0297   -0.0286   -0.0258
   -0.0181   -0.0341   -0.0463   -0.0536   -0.0560   -0.0539   -0.0485
   -0.0246   -0.0463   -0.0628   -0.0728   -0.0760   -0.0732   -0.0658
   -0.0285   -0.0536   -0.0728   -0.0844   -0.0881   -0.0848   -0.0763
   -0.0297   -0.0560   -0.0760   -0.0881   -0.0920   -0.0886   -0.0797
   -0.0286   -0.0539   -0.0732   -0.0848   -0.0886   -0.0853   -0.0767
   -0.0258   -0.0485   -0.0658   -0.0763   -0.0797   -0.0767   -0.0690
   -0.0218   -0.0411   -0.0557   -0.0646   -0.0675   -0.0650   -0.0584
   -0.0175   -0.0329   -0.0446   -0.0517   -0.0540   -0.0520   -0.0468
   -0.0133   -0.0250   -0.0339   -0.0393   -0.0410   -0.0395   -0.0356
   -0.0096   -0.0181   -0.0245   -0.0284   -0.0297   -0.0286   -0.0257
   -0.0066   -0.0124   -0.0169   -0.0196   -0.0204   -0.0197   -0.0177
   -0.0043   -0.0082   -0.0111   -0.0129   -0.0134   -0.0129   -0.0116
   -0.0027   -0.0051   -0.0070   -0.0081   -0.0084   -0.0081   -0.0073
   -0.0016   -0.0031   -0.0042   -0.0048   -0.0051   -0.0049   -0.0044
   -0.0009   -0.0018   -0.0024   -0.0028   -0.0029   -0.0028   -0.0025
   -0.0005   -0.0010   -0.0013   -0.0015   -0.0016   -0.0015   -0.0014
   -0.0003   -0.0005   -0.0007   -0.0008   -0.0008   -0.0008   -0.0007
   -0.0001   -0.0003   -0.0003   -0.0004   -0.0004   -0.0004   -0.0004
   -0.0001   -0.0001   -0.0002   -0.0002   -0.0002   -0.0002   -0.0002

  Columns 29 through 35

    0.0001    0.0001    0.0001    0.0001    0.0000    0.0000    0.0000
    0.0003    0.0002    0.0002    0.0001    0.0001    0.0001    0.0000
    0.0006    0.0005    0.0004    0.0003    0.0002    0.0001    0.0001
    0.0012    0.0009    0.0007    0.0005    0.0004    0.0002    0.0001
    0.0021    0.0017    0.0013    0.0009    0.0006    0.0004    0.0003
    0.0037    0.0030    0.0023    0.0016    0.0011    0.0007    0.0005
    0.0062    0.0049    0.0038    0.0027    0.0019    0.0012    0.0008
    0.0098    0.0079    0.0060    0.0043    0.0030    0.0020    0.0012
    0.0150    0.0120    0.0091    0.0066    0.0045    0.0030    0.0019
    0.0218    0.0174    0.0132    0.0096    0.0066    0.0043    0.0027
    0.0301    0.0241    0.0183    0.0132    0.0091    0.0060    0.0038
    0.0396    0.0317    0.0241    0.0174    0.0120    0.0079    0.0049
    0.0495    0.0396    0.0301    0.0218    0.0150    0.0098    0.0062
    0.0584    0.0468    0.0356    0.0257    0.0177    0.0116    0.0073
    0.0650    0.0520    0.0395    0.0286    0.0197    0.0129    0.0081
    0.0675    0.0540    0.0410    0.0297    0.0204    0.0134    0.0084
    0.0646    0.0517    0.0393    0.0284    0.0196    0.0129    0.0081
    0.0557    0.0446    0.0339    0.0245    0.0169    0.0111    0.0070
    0.0411    0.0329    0.0250    0.0181    0.0124    0.0082    0.0051
    0.0218    0.0175    0.0133    0.0096    0.0066    0.0043    0.0027
         0         0         0         0         0         0         0
   -0.0218   -0.0175   -0.0133   -0.0096   -0.0066   -0.0043   -0.0027
   -0.0411   -0.0329   -0.0250   -0.0181   -0.0124   -0.0082   -0.0051
   -0.0557   -0.0446   -0.0339   -0.0245   -0.0169   -0.0111   -0.0070
   -0.0646   -0.0517   -0.0393   -0.0284   -0.0196   -0.0129   -0.0081
   -0.0675   -0.0540   -0.0410   -0.0297   -0.0204   -0.0134   -0.0084
   -0.0650   -0.0520   -0.0395   -0.0286   -0.0197   -0.0129   -0.0081
   -0.0584   -0.0468   -0.0356   -0.0257   -0.0177   -0.0116   -0.0073
   -0.0495   -0.0396   -0.0301   -0.0218   -0.0150   -0.0098   -0.0062
   -0.0396   -0.0317   -0.0241   -0.0174   -0.0120   -0.0079   -0.0049
   -0.0301   -0.0241   -0.0183   -0.0132   -0.0091   -0.0060   -0.0038
   -0.0218   -0.0174   -0.0132   -0.0096   -0.0066   -0.0043   -0.0027
   -0.0150   -0.0120   -0.0091   -0.0066   -0.0045   -0.0030   -0.0019
   -0.0098   -0.0079   -0.0060   -0.0043   -0.0030   -0.0020   -0.0012
   -0.0062   -0.0049   -0.0038   -0.0027   -0.0019   -0.0012   -0.0008
   -0.0037   -0.0030   -0.0023   -0.0016   -0.0011   -0.0007   -0.0005
   -0.0021   -0.0017   -0.0013   -0.0009   -0.0006   -0.0004   -0.0003
   -0.0012   -0.0009   -0.0007   -0.0005   -0.0004   -0.0002   -0.0001
   -0.0006   -0.0005   -0.0004   -0.0003   -0.0002   -0.0001   -0.0001
   -0.0003   -0.0002   -0.0002   -0.0001   -0.0001   -0.0001   -0.0000
   -0.0001   -0.0001   -0.0001   -0.0001   -0.0000   -0.0000   -0.0000

  Columns 36 through 41

    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0001    0.0001    0.0000    0.0000    0.0000    0.0000
    0.0002    0.0001    0.0001    0.0000    0.0000    0.0000
    0.0003    0.0002    0.0001    0.0000    0.0000    0.0000
    0.0005    0.0003    0.0001    0.0001    0.0000    0.0000
    0.0007    0.0004    0.0002    0.0001    0.0001    0.0000
    0.0011    0.0006    0.0004    0.0002    0.0001    0.0000
    0.0016    0.0009    0.0005    0.0003    0.0001    0.0001
    0.0023    0.0013    0.0007    0.0004    0.0002    0.0001
    0.0030    0.0017    0.0009    0.0005    0.0002    0.0001
    0.0037    0.0021    0.0012    0.0006    0.0003    0.0001
    0.0044    0.0025    0.0014    0.0007    0.0004    0.0002
    0.0049    0.0028    0.0015    0.0008    0.0004    0.0002
    0.0051    0.0029    0.0016    0.0008    0.0004    0.0002
    0.0048    0.0028    0.0015    0.0008    0.0004    0.0002
    0.0042    0.0024    0.0013    0.0007    0.0003    0.0002
    0.0031    0.0018    0.0010    0.0005    0.0003    0.0001
    0.0016    0.0009    0.0005    0.0003    0.0001    0.0001
         0         0         0         0         0         0
   -0.0016   -0.0009   -0.0005   -0.0003   -0.0001   -0.0001
   -0.0031   -0.0018   -0.0010   -0.0005   -0.0003   -0.0001
   -0.0042   -0.0024   -0.0013   -0.0007   -0.0003   -0.0002
   -0.0048   -0.0028   -0.0015   -0.0008   -0.0004   -0.0002
   -0.0051   -0.0029   -0.0016   -0.0008   -0.0004   -0.0002
   -0.0049   -0.0028   -0.0015   -0.0008   -0.0004   -0.0002
   -0.0044   -0.0025   -0.0014   -0.0007   -0.0004   -0.0002
   -0.0037   -0.0021   -0.0012   -0.0006   -0.0003   -0.0001
   -0.0030   -0.0017   -0.0009   -0.0005   -0.0002   -0.0001
   -0.0023   -0.0013   -0.0007   -0.0004   -0.0002   -0.0001
   -0.0016   -0.0009   -0.0005   -0.0003   -0.0001   -0.0001
   -0.0011   -0.0006   -0.0004   -0.0002   -0.0001   -0.0000
   -0.0007   -0.0004   -0.0002   -0.0001   -0.0001   -0.0000
   -0.0005   -0.0003   -0.0001   -0.0001   -0.0000   -0.0000
   -0.0003   -0.0002   -0.0001   -0.0000   -0.0000   -0.0000
   -0.0002   -0.0001   -0.0001   -0.0000   -0.0000   -0.0000
   -0.0001   -0.0001   -0.0000   -0.0000   -0.0000   -0.0000
   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

>> mesh(X,Y,Z)
>> f1=inline('-(-x(1).*x(2).*exp(-2.*(x(1).^2+x(2).^2)))');
>> [x12min,fval]=fminsearch(f,[-1,-1])

x12min =

   -0.5000   -0.5000


fval =

   -0.0920

Minggu, 27 April 2014

Garden Flower Box













Flower Windows Box Ideas


Fresh up your house with WINDOWS BOX. Make a beautiful impression of eye catching object in sunny spot of your house.


 









Senin, 21 April 2014

Grafik 3D (3)

x=-2*pi:2*pi
y=x;
[X,Y]=meshgrid(x,y);
Z=(1-2.*Y.*(X-1).^2).*exp(-((X-1).^2));
mesh(X,Y,Z)





 waterfall(X,Y,Z)




 

surf(X,Y,Z)






 surfc(X,Y,Z)







surfl(X,Y,Z)





x=-2*pi:0.5:2*pi
y=x;
[X,Y]=meshgrid(x,y);
Z=(1-2.*Y.*(X-1).^2).*exp(-((X-1).^2));
surfl(X,Y,Z)



 x=-2*pi:1:2*pi
y=x;
[X,Y]=meshgrid(x,y);
Z=(1-2.*Y.*(X-1).^2).*exp(-((X-1).^2));
surfl(X,Y,Z)



Grafik 3D (2)


>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> [X,Y,Z]=peaks(30);
>> [X,Y,Z]=peaks(30);
>> surf(X,Y,Z);
>> pcolor(X,Y,Z)

>> shading interp

>> hold on
>> shading interp
>> hold on
>> contour(X,Y,Z,19,'k')

>> [dy,dx]=gradient(Z,0.5,0.5);
>> quiver(X,Y,dx,dy)

>> cs=contour(X<Y<Z)
>> clabel(cs)

Grafik 3D

HELIX
»t=0:pi/50:10*pi;
» plot3(sin(t),cos(t),t,'-o')
» title('Helix'),xlabel('sin(t)'),ylabel('cos(t)'),zlabel('t')
» text(0,0,0,'titik asal')






>> x=linspace(0,3*pi);
>> z1=sin(x);
>> z2=sin(2*x);
>> z3=sin(3*x);
>> y1=zeros(size(x));
>> y2=ones(size(x));
>> y3=y2/2;
>> plot3(x,y1,z1,x,y2,z2,x,y3,z3)






>> subplot(2,2,1);
>> plot3(x,y1,z1,x,y2,z2,x,y3,z3)
>> title('default, Az=-37.5 El=30')
>> view(-37.5,30)
>> subplot(2,2,2);
>> plot3(x,y1,z1,x,y2,z2,x,y3,z3)
>> title('dirotasi ke 52.5')
>> view(-37.5+90,30)
>> subplot(2,2,3);
>> plot3(x,y1,z1,x,y2,z2,x,y3,z3)
>> title('elevasi menjadi 60')
>> view(-37.5,60)
>> subplot(2,2,4)
>> plot3(x,y1,z1,x,y2,z2,x,y3,z3)
>> title('Az=0 El=90')
>> view(0,90)
>> grid



>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> mesh(X,Y,Z)



>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> meshz(X,Y,Z)


>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> meshc(X,Y,Z)



>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> waterfall(X,Y,Z)





>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> surf(X,Y,Z)




>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> surfc(X,Y,Z)





>> x=[-7.5:0.5:7.5]
>> y=x;
>> [X,Y]=meshgrid(x,y)
>> R=sqrt(X.^2+Y.^2)+eps;
>> Z=sin(R)./R;
>> surfl(X,Y,Z)










Selasa, 15 April 2014

Nilai Minimum Maksimum

>> ezplot('cos(x)')







>> ezplot('cos(x)',[0,pi])



>> f=inline('x^3-2*x+5')

f =

     Inline function:
     f(x) = x^3-2*x+5

>> ezplot(f)


>> xmin=fminbnd('x^3-2*x+5',0,2)

xmin =

    0.8165

>> xmax=fminbnd('x^3-2*x+5',0,2)

xmax =

    0.8165

>> ymax=f(xmax)

ymax =

    3.9113

>> ymin=f(xmin)

ymin =

    3.9113



 **********************************************************************************

  y(x) = (x|x-1|)/(2+x^2)

>> y=inline('(x*abs(x-1))/(2+x^2)')

y =

     Inline function:
     y(x) = (x*abs(x-1))/(2+x^2)

>> xmin=fminbnd('(x*abs(x-1))/(2+x^2)',-2,2)

xmin =

   -1.9999

>> xmax=fminbnd('(x*abs(x-1))/(2+x^2)',-2,2)

xmax =

   -1.9999

>> ymin=f(xmin)

ymin =

    1.0006

>> ymax=f(xmax)

ymax =

    1.0006
>> tnol=fzero(y,-2)

tnol =

  9.4976e-026

>> ynol=f(tnol)

ynol =

     5

>> tnol=fzero(y,2)

tnol =

  2.5838e-019

>> ezplot(y)