Question
Please solve it in MATLAB

6) Interpolation and plot: y=x*; x=0:5; a) Interpolate: x1= 1.5; x2=2.5; x3=3.5 b) Plot x and y and label axis. 7)- A= [1,2;3
0 0
Add a comment Improve this question Transcribed image text
Answer #1

%----ques(6)-------------------------------------------------------------
x=(0:5)';
y=x.^3;
xi=[1.5 2.5 3.5]';
yi=interp1q(x,y,xi);
hold on
plot(x,y,'-r',xi,yi,'o');
xlabel('X-axis');
ylabel('Y-axis');
%--------ques(7)---------------------------------------------------
A=[1,2;3,4];
B=[5,6;7,8];
A_plus_B = A+B;
A_minus_B = A-B;
A_MULT_B =A*B;
A_BY_B = A/B;
A_INVERSE = A^-1;
B_INVERSE = B^-1;
A_DOT_B = A.*B;
A_DOT_BY_B = A./B;
%--------ques(8)-------------------------------------------------------
syms X;
Y=X^4 - 2*X^2 + 3*X - 4;
integ=int(Y);%part(a)
sol=roots([1 0 -2 3 -4]); % [1 0 -2 3 -4] are coeff of equation
Int=int(Y,-5,5); %part(c)

Add a comment
Know the answer?
Add Answer to:
Please solve it in MATLAB 6) Interpolation and plot: y=x*; x=0:5; a) Interpolate: x1= 1.5; x2=2.5;...
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