1 / 21

INTERPOLASYON

INTERPOLASYON. Matlab ile ara değer bulma. INTERPOLASYON TEKNİKLERİ. Hesaplanamayan fonksiyonlara, ( gözardı edilebilir bir hata payı ile), bir tür yaklaşım yöntemidir.

belle
Télécharger la présentation

INTERPOLASYON

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INTERPOLASYON Matlab ile ara değer bulma.

  2. INTERPOLASYON TEKNİKLERİ • Hesaplanamayan fonksiyonlara, (gözardı edilebilir bir hata payı ile), bir tür yaklaşım yöntemidir. • Rasyonel interpolasyonyöntemleri ile açık ve kapalı formüller elde edilebilir ve bu formüller adi diferansiyel denklemler için başlangıç değer problemine uygulanarak yaklaşık çözümler elde edilir. • Kısaca interpolasyon, elimizde bulunan değerlerle, bulunmayan değerlerin elde edilmesidir.

  3. MatlabInterpolasyonFonksiyonları • Ara değer bulma fonksiyonları, verilen tek, iki yada üç boyutla veriler arasında, ara değerler üretir. • interp1 • interp2 • interp3 • meshgrid • pchip • spline

  4. INTERP1 – Tek boyutlu interpolasyon • Tanım : • Tek boyutlu ara değerleri hesaplar. • Kullanım : • yi = interp1(x,Y,xi)yi = interp1(Y,xi)yi = interp1(x,Y,xi,method)yi = interp1(x,Y,xi,method,'extrap')yi = interp1(x,Y,xi,method,extrapval)pp = interp1(x,Y,method,'pp')

  5. Spline metodu, splie fonksiyonunu çağrırıç • Pchip ve cubicmetodları, pchip fonksiyonunu çağırır. • 'nearest' en yakın komşuluk ara değer bulma • 'linear' lineer ara değer bulma • 'spline' kübik spline ara değer bulma • 'cubic' kübik ara değer bulma • ‘pchip‘ PiecewisecubicHermiteinterpolation

  6. INTERP1 – Tek boyutlu interpolasyon • Örnek : • t = 1900:10:1990; • p = [75.995 91.972 105.711 123.203 131.669... • 150.697 179.323 203.212 226.505 249.633]; >> interp1(t,p,1975) ans = 214.8585

  7. INTERP2 – 2 Boyutlu Interpolasyon • Lookuptablosaileçalışan 2 boyutlu ara değer bulma. • Kullanım : • ZI = interp2(X,Y,Z,XI,YI)ZI = interp2(Z,XI,YI)ZI = interp2(Z,ntimes)ZI = interp2(X,Y,Z,XI,YI,method)ZI = interp2(...,method, extrapval)

  8. INTERP2 - 2 boyutlu Interpolasyon • Örnek : >>[X,Y] = meshgrid(-3:.25:3); Z= peaks(X,Y); [XI,YI] = meshgrid(-3:.125:3); ZI = interp2(X,Y,Z,XI,YI); mesh(X,Y,Z), hold, mesh(XI,YI,ZI+15) holdoff axis([-3 3 -3 3 -5 20])

  9. INTERPN - Çok boyutlu Interpolasyon • Çok boyutlu ara değer hesaplar. • Kullanım : VI = interpn(X1,X2,X3,...,V,Y1,Y2,Y3,...) VI = interpn(V,Y1,Y2,Y3,...) VI = interpn(V,n)VI = interpn(...,metot).

  10. INTERPN - Çok boyutlu Interpolasyon

  11. PCHIP – HermitInterpolasyonu • Tanım : • Kullanım : • yi = pchip(x,y,xi)pp = pchip(x,y)

  12. PCHIP – HermiteInterpolasyonu • Örnek : x = -3:3; y = [-1 -1 -1 0 1 1 1]; t = -3:.01:3; p = pchip(x,y,t); s = spline(x,y,t); plot(x,y,'o',t,p,'-',t,s,'-.') legend('data','pchip','spline',4)

  13. SPLINE Interpolasyonu • Tanım: • Kübik şerit ara değer bulur. • yy = spline(x,Y,xx)pp = spline(x,Y)

  14. SPLINE Interpolasyonu • Örnek x = 0:10; y = sin(x); xx = 0:.25:10; yy = spline(x,y,xx); plot(x,y,'o',xx,yy)

  15. SPLINE Interpolasyonu

  16. MESHGRID – Yüzey Interpolasyonu • Tanım : • Üç boyutta, x ve y yönünde are değer bulmayı sağlar. • Kullanım : • [X,Y] = meshgrid(x,y)[X,Y] = meshgrid(x)[X,Y,Z] = meshgrid(x,y,z)

  17. MESHGRID – Yüzey Interpolasyonu [X,Y] = meshgrid(-2:.2:2, -2:.2:2); Z = X .* exp(-X.^2 - Y.^2); surf(X,Y,Z)

  18. MESHGRID – Yüzey Interpolasyonu

  19. INTERP3 – 3 Boyutta ara değer bulma • Tanım: • 3 Boyutta verilerin ara değer bulmayı sağlar. • VI = interp3(X,Y,Z,V,XI,YI,ZI)VI = interp3(V,XI,YI,ZI)VI = interp3(V,ntimes)VI = interp3(...,method)VI = interp3(...,method,extrapval)

  20. INTERP3 – 3 Boyutta ara değer bulma • Örnek : • [x,y,z,v] = flow(10); [xi,yi,zi] = meshgrid(.1:.25:10, -3:.25:3, -3:.25:3); vi = interp3(x,y,z,v,xi,yi,zi); % vi is 25-by-40-by-25 slice(xi,yi,zi,vi,[6 9.5],2,[-2 .2]), shadingflat

  21. INTERP3 – 3 Boyutta ara değer bulma

More Related