Question
in put and output done in computer please
Use MATLAB or Scilab to solve the following problems 1. Create a MATLAB subroutine called Lagrange.m that receives two set da
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi,

Answer:

Matlab Description:
As we know that the Matlab is the fourth-generation programming language that can be used for the analysis of the environment numerically.
Using the Matlab involves many algorithms that can create an interface and visualize the data.

Lagrange Interpolation Form Description:
In the numerical analysis, the Lagrange interpolation form will be used for the polynomial.
Suppose we have a point whose values are not equal then the Lagrange polynomial will be used because it can be determined the lowest degree as compared to the current value.

Matlab Code:

func y=LagPol(x,x1,y1)

N=size(x1,2);

Lag=ones(N,size(x,2));

for a=1:N

for b=1:N

if(a~=b)

Lag(a,:)=Lag(b,:).*(x-point(b))/(x1(a)-point(b));

end

end

end

y=0;

for a=1:N

y=y+y1(a) *Lag(a,:);

end

end

Add a comment
Know the answer?
Add Answer to:
in put and output done in computer please Use MATLAB or Scilab to solve the following...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT