Powered By Blogger

Selasa, 25 Maret 2014

Membuat Grafik





MATLAB


>> x=[1 2 5 7 9 10 13 17]

x =

     1     2     5     7     9    10    13    17

>> y=[2 5 6 9 11 16 19 23]

y =

     2     5     6     9    11    16    19    23

>> plot(x,y)
>> plot(x,y,'*')
>> p1=polyfit(x,y,1)

p1 =

    1.3301    0.7342


>> A=linspace(0,1);
>> B=polyval(p1,A);
>> plot(x,y,'*',A,B)
>> figure
>>


0 komentar:

Posting Komentar