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

Assignment Help:

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);


Related Discussions:- Find the right hand side of the interpolation system

How to open simpower, How to Open Simpower: 1. Open MATLAB 2. ...

How to Open Simpower: 1. Open MATLAB 2. In the "Command Window" write ' simulink ' and press Enter or click on the Simulink icon. 3. Simulink Library Browser w

Calculate the signal-to-noise ratio, Use the MATLAB randn function to gener...

Use the MATLAB randn function to generate 1000 points for x. Generate the output of the unknown system with the ?lter function and b=[1232 1] and a=[1]. Normalise the ?lter output

Looping statements, Looping Statements: Consider the problem of comput...

Looping Statements: Consider the problem of computing the area of a circle with radius of 0.3 centimeters-a MATLAB program certainly is not required to do that; you would use

2 dimensional finite element analysis, i need matlab code on 2 dimensional...

i need matlab code on 2 dimensional analysis of temperature distribution in steel using finite element method

Adaptive filters, Adaptive filters can also be used in other applications. ...

Adaptive filters can also be used in other applications. Speech recognition, for example, is performed in a non-stationary environment, and therefore may require adaptive filtering

GAUSS ELIMNATION, 1;write a matlab of geuss elimination with scaling and pi...

1;write a matlab of geuss elimination with scaling and pivoting under consideration?

Appending data to a data file, Appending data to a data File: A text f...

Appending data to a data File: A text file once exists; the data can be appended to it. The format is similar as formerly, with the addition of the qualifier -append. For illu

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd