MATLAB HELP PLEASE INCLUDE THE MATLAB CODE a Find a cubicpol

MATLAB HELP (PLEASE INCLUDE THE MATLAB CODE)

(a) Find a cubicpolynomial of the form y = a + bx + cx2 + dx3 that interpolates the data points (2,1), (1,3), ( 1 /2 , 2) , (3,10). (b) Draw a graph which shows the givenpoints.

Solution

by using this code you can easily find out the values of A,B,C,D.

then you will get the equation in the form of y=a+bx+cx^2+dx^3 just put the value of A,B,C,D that we have already find out.

consider this equation: ( ( 5+ 6*x)/3 )^3 + ((2 - 3*x + 4*y)/2) ^2 =0;

There are many ways to go about this. You can just plot the function as a surface and just visually see where f(x,y)=0

x = -10:.1:10;
y = -10:.1:10;
[xnew,ynew] = meshgrid(x,y);
z = ( ( 5+ 6*xnew)/3 ).^3 + ((2 - 3*xnew + 4*ynew)/2).^2;
surf(x,y,z)
shading interp
view(-16,12)

You can do it as a 3d contour which makes it a bit more salient where f(x,y)=0

contour3(xnew,ynew,z);

or simply as a filled contour

contourf(xnew,ynew,z); xlabel(\'X\'); ylabel(\'Y\');

like this you can plot any equation in MATLAB.

MATLAB HELP (PLEASE INCLUDE THE MATLAB CODE) (a) Find a cubicpolynomial of the form y = a + bx + cx2 + dx3 that interpolates the data points (2,1), (1,3), ( 1 /

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site