Question

i 0) 2) Interolae a quadelgn 0.6 1.3 1.7 2.1 1.2 2.4 3.0 4.2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

% This code solves for quadratic interpolation
x = [1.2 2.4 3.0 4.2];
y = [06 1.3 1.7 2.1];
N = length(x)-1;
% The unknowns are 3*N with ao=0 "Linear Spline"
% Filling Matrix from point matching
V = [0;zeros(2*N,1);zeros(N-1,1)];
Z = zeros(length(V),length(V));
j=1;
f=1;
for i=2:2:2*N
Z(i,f:f+2) = [x(j)^2 x(j) 1];
V(i) = y(j);
j = j+1;
Z(i+1,f:f+2) = [x(j)^2 x(j) 1];
V(i+1) = y(j);
f = f+3;
end
% Filling Matrix from smoothing condition
j=1;
l=2;
for i=2*N+2:3*N
  
Z(i,j:j+1) = [2*x(l) 1];
Z(i,j+3:j+4) = [-2*x(l) -1];
j = j+3;
l = l+1;
end
% Adjusting the value of a1 to be zero "Linear Spline"
Z(1,1)=1;
% Inverting and obtaining the coeffiecients, Plotting
Coeff = Z\V;
j=1;
hold on;
for i=1:N
curve=@(l) Coeff(j)*l.^2+Coeff(j+1)*l+Coeff(j+2);
ezplot(curve,[x(i),x(i+1)]);
hndl=get(gca,'Children');
set(hndl,'LineWidth',2);
hold on
j=j+3;
end
scatter(x,y,50,'r','filled')
grid on;
xlim([min(x)-2 max(x)+2]);
ylim([min(y)-2 max(y)+2]);
xlabel('x');
ylabel('y');
title('Quadratic Spline')Quadratic Spline

Add a comment
Know the answer?
Add Answer to:
i 0) 2) Interolae a quadelgn 0.6 1.3 1.7 2.1 1.2 2.4 3.0 4.2 i 0) 2) Interolae a quadelgn 0.6 1.3 1.7 2.1 1.2 2.4 3.0 4.2
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
  • Which of the following have at least one polar bond He Ne 0.7 0.9 1.0/1.3/1.5/1.7 1.9/2.2...

    Which of the following have at least one polar bond He Ne 0.7 0.9 1.0/1.3/1.5/1.7 1.9/2.2 2.2 2.2 2.4 Hg Tl H 2.1 4.0 N 3.5 3.0 Be B 2.5 Li 1.5 2.0 Cl S 3.0 1.0 Mg Si ΑΙ 2.1 Na Br 1.8 1.2 0.9 1.5 Fe V 2.8 Co Cr Mn Ni Cu Ti Sc Zn Ga Ge As 2.4 K Ca 1.3 1.5 1.6 1.6 1.5 1.8 1.9 1.9 1.9 1.6 1.6 1.8 2.0 Ru Rh 1.0...

  • Cannot use excel file due to file size... what should i do State     Price     Size NJ        375       2.1 NJ        20...

    Cannot use excel file due to file size... what should i do State     Price     Size NJ        375       2.1 NJ        200       0.9 NJ        599       2.3 NJ        365       2.1 NJ        220       2.1 NJ        250       1.9 NJ        410       2.2 NJ        429       2.8 NJ        325       2 NJ        235       1.1 NY       145       1.3 NY       875       2.9 NY       300       1.5 NY       370       1.1 NY       268       1.5 NY       1399     4.8 NY       1125     3.1 NY       299       1.4 NY       110       1.2 NY       2999     6 PA        282       2.6 PA        135      ...

  • Next increasing order. Do not separate the answers with comma. If there are no leaves, enter...

    Next increasing order. Do not separate the answers with comma. If there are no leaves, enter "N". Check Answer 2.5 3.6 3.1 4.2 1.4 3.5 4.0 4.6 3.7 0.5 1.6 0.5 2.4 1.5 1.5 0.9 0.6 3.4 1.1 2.6 0.9 2.7 1.2 33 3.1 1.8 1.6 59 2.2 1.2 2.7 14 3.8 1.3 2.1 1.9 3.5 3.0 1.2 1.0 0.3 1.6 3.1 1.1 1.1 1.8 2.1 1.3 6.6 2.5 Download data Tables

  • 2. The following are data for thickness (in cm) of tree bark, obtained from a SRS. Let's assume 1.3 cm for the population. that σ 3.0 3.2 1.7 0.3 2.4 2.6 2.7 1.5 2.0 3.1 0.2 2.2 3.6 3.2 4.0 1.3 3...

    2. The following are data for thickness (in cm) of tree bark, obtained from a SRS. Let's assume 1.3 cm for the population. that σ 3.0 3.2 1.7 0.3 2.4 2.6 2.7 1.5 2.0 3.1 0.2 2.2 3.6 3.2 4.0 1.3 3.2 2.3 2.7 1.4 1.6 (a) (4 points) Make a histogram of the data. Is there evidence against the conjecture that the data comes from a Normal distribution? (b) (4 points) Construct a 96% confidence interval for the mean...

  • State   Price   Size NJ   375   2.1 NJ   200   0.9 NJ   599   2.3 NJ   365   2.1 NJ   220   2.1 NJ   250   1.9 NJ   410 ...

    State   Price   Size NJ   375   2.1 NJ   200   0.9 NJ   599   2.3 NJ   365   2.1 NJ   220   2.1 NJ   250   1.9 NJ   410   2.2 NJ   429   2.8 NJ   325   2 NJ   235   1.1 NY   145   1.3 NY   875   2.9 NY   300   1.5 NY   370   1.1 NY   268   1.5 NY   1399   4.8 NY   1125   3.1 NY   299   1.4 NY   110   1.2 NY   2999   6 PA   282   2.6 PA   135   1.3 PA   179   1.8 PA   800   3 PA   145   1.2 PA   170  ...

  • Recent research indicates that the effectiveness of antidepressant medication is directly related to the severity of...

    Recent research indicates that the effectiveness of antidepressant medication is directly related to the severity of the depression (Khan, Brodhead, Kolts & Brown, 2005). Based on pretreatment depression scores, patients were divided into four groups based on their level of depression. After receiving the antidepressant medication, depression scores were measured again and the amount of improvement was recorded for each patient. The following data are similar to the results of the study. Low Moderate High Moderate Moderately Severe Severe 1.2...

  • The following data were obtained from a 14ft (drill length) core in shale with discontinuities-bedding surface...

    The following data were obtained from a 14ft (drill length) core in shale with discontinuities-bedding surface and high angle joints. Measurements are in inches (in) 5.7 1.3 0.5 1.1 5.3 1.3 3.4 0.3 2.0 4.3 3.2 1.2 2.3 2.9 2,8 3,2 1.2 1.2 3.0 6.2 2.9 6.4 2.6 2.6 3.5 1.0 0.5 1.1 6.8 0.3 0.9 1.7 2.1 5,9 0.9 2.0 0.5 3.1 2.3 4.1 4.2 2.2 2.8 4.3 2.0 4.4 4.5 3.6 0.5 2.1 Calculate the core loss (15...

  • More Vectors! Let A = 1.2 cmi + 5.4cmj. B-1.3 emi + 2.4 cm3- : 4.4...

    More Vectors! Let A = 1.2 cmi + 5.4cmj. B-1.3 emi + 2.4 cm3- : 4.4 cmi Find: a. The magnitude and direction of A,B, and C. Express the direction as an angle, in degrees, assuming 0 is the positive axis and counterclockwise angles are positive. A: Magnitude B: Magnitude = C: Magnitude cm Direction cm Direction = i cm Direction b. The magnitude and direction of the vector R-A 1.5B+3C. Magnitude R i cm Direction

  • 2.4 kN/m Problem No. 1 (25%): 2 kN/m y = kx 3.0 KN 300 For the...

    2.4 kN/m Problem No. 1 (25%): 2 kN/m y = kx 3.0 KN 300 For the beam and loading shown, determine (a) the magnitude and location of the resultant of the distributed load (b) the reactions at the beam supports (Fig. 1). B A 0.6 m 1.2 m - 0.8 m 2.4 m —- - 10 ml Fig. 1

  • To decide on the number of service counters needed for stores to be built in the...

    To decide on the number of service counters needed for stores to be built in the future, a supermarket chain wanted to obtain information on the length of time (in minutes) required to service customers. To find the distribution of customer service times, a sample of 60 customers' service times was recorded and are shown here. 0.5 1.2 5.2 1.2 0.4 3.7 0.3 0.2 3.1 1.6 0.6 2.3 1.8 0.4 2.8 1.2 1.0 1.3 1.0 0.8 1.9 1.0 0.5 1.0...

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