Find the right hand side of the interpolation system, MATLAB Programming

function y=tps(r)

% This is the thin-plate spline

if r < 0.000000000001

 y=0;

else

 y=r^2*log(r);

end

function y=fun(point)

% my target function

x=point(1);

z=point(2);

y=7-4*x^2+z^3;

function y=interpmat(points)

% this file computes the interpolation matrix

[n,m]=size(points);

for i=1:n

ipoint=points(i,:);

for j=1:n

jpoint=points(j,:);

mat(i,j)=tps(norm(ipoint-jpoint));

end

mat(i,n+1)=1;

mat(n+1,i)=1;

mat(i,n+2)=ipoint(1);

mat(n+2,i)=ipoint(1);

mat(i,n+3)=ipoint(2);

mat(n+3,i)=ipoint(2);

end

y=mat;

function y=righthandside(points)

% find the right hand side of the interpolation system

[n,m]=size(points);

for i=1:n

y(i)=fun(points(i,:));

end

y(n+1)=0;

y(n+2)=0;

y(n+3)=0;

function y=testinterp(n,m)

% this file test our interpolation routine

points=rand(n,2);

% compute interpolation matrix

mat=interpmat(points);

% create the right hand side

rhs=righthandside(points);

solution=inv(mat)*rhs';

% test solution

tpoints=rand(m,2)

maxerr=testsol(points,tpoints,solution);

Posted Date: 3/7/2013 4:22:32 AM | Location : United States







Related Discussions:- Find the right hand side of the interpolation system, Assignment Help, Ask Question on Find the right hand side of the interpolation system, Get Answer, Expert's Help, Find the right hand side of the interpolation system Discussions

Write discussion on Find the right hand side of the interpolation system
Your posts are moderated
Related Questions
i want to extract an image from its background in matlab..the image is a binary image

Show (turn in) similar output images as in part 2 for each of your new images (there is only 1 connected component in this case). Write three functions which compute the moments, c

The mass of the spring-mass-damper system shown below was initially displaced by 1 meter to the right and then released. The subsequent acceleration of the mass was measured using

Illustration of Built-in functions and help: To find out what a specific function does and how to call it, type help and then the name of function. Illustration: >> help si

Your functions will allow you to create the following graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and t

Build a single phase model for the simple 3-phase system shown in the single line diagram shown below using SimPowerSystems in MATLAB Simulink. Data: Source Voltage

In this lab, we study the three concepts. Vector is used to store more than one value into single variable. It is similar to array (other programming language). Script is a collect


kind in geometric calculity in space AREA. >

Ant Colony Optimization for Optimization of Route path taken Ant Colony Algorithm is a potential candidate for coupled, 3D optimisation. Ant Colony Algorithm enjoys the overall