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

Determine standard deviation, Find f(t) for each F(s): Problem: ...

Find f(t) for each F(s): Problem: Based on an examination given to a large class in which the maximum score is 100 points, assuming that 20 grades taken at random f

Missing commands, hey ! why the command sawtooth and square does not exist ...

hey ! why the command sawtooth and square does not exist in Matlab R2012a?

Matlab project, I would like to ask if its possible to get help programing ...

I would like to ask if its possible to get help programing in matlab. If yes - how can I get help ?

#title.matrix, #defining matrix using only special commands

#defining matrix using only special commands

Call to length function, Call to length function: The call to length f...

Call to length function: The call to length function consists of the name of the function, followed by an argument in the parentheses. This function takes the argument, and re

Airy equations, Need help programming in Matlab for airy equations

Need help programming in Matlab for airy equations

Determine an expression for the transfer function, The circuit diagram of a...

The circuit diagram of an active filter is shown below. (a) Determine an expression for the transfer function of the filter. (b) Hence find an expression for the frequency res

display in gui, how to display any words to the editto

how to display any words to the edittor

Function with float and integer, hi i have this programm function [IRN,num...

hi i have this programm function [IRN,number ] = randnumbers( IRN ) IRN=int32(IRN) ITOTAL=(IRN*330)+100 ITOTAL=int32(ITOTAL); IQUOTIENT=ITOTAL/2303 IQUOTIENT=int32(IQUOTIENT);

Create a model or spreadsheet in matlab, The pressure radiated by a column ...

The pressure radiated by a column of in-phase monopole sources may be expressed as: Create a model (spreadsheet / MATLAB etc) for a 6 element column, where d=0.2m . Figure

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