Question

The following data are the shoulder-hip length and the vertical thickness of the bodies of some quadrupeds at the zoo in Zuri
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Script:

close all
clear
clc

L = [12 35 90 122 153]';
H = [4 12 45 73 135]';

% Part (a)
fprintf('Part (a)\n--------------------------------------\n')
disp('Let H = a*L^b be the power function')
disp('ln(H) = ln(a) + b*ln(L)')

A = [ones(size(L)), log(L)];
C = A\log(H);
a = exp(C(1)); b = C(2);
fprintf('Predicted Model: ln(H) = %.4f + (%.4f)*ln(L)\n', C(1), C(2))

% Part (b)
fprintf('\nPart (b)\n--------------------------------------\n')
fprintf('Vertical Thickness (When Length = 145 cm): %.4f\n', a*145^b)

% Part (c)
fprintf('\nPart (c)\n--------------------------------------\n')
fprintf('Power Function: H = (%.4f)*L^(%.4f)\n', a, b)

% Plotting
LL = min(L):0.1:max(L);
HH = a*LL.^b;
figure, plot(L,H,'o',LL,HH)
xlabel('L'), ylabel('H')
title('Power Function'), legend('Data Points', 'Power Function', 'Location', 'northwest')

Plot:

Power Function 140 O Data Points Power Function 120 100 80 60 40 20 20 40 60 80 100 120140160

Output:

Part (a)
--------------------------------------
Let H = a*L^b be the power function
ln(H) = ln(a) + b*ln(L)
Predicted Model: ln(H) = -2.0953 + (1.3424)*ln(L)

Part (b)
--------------------------------------
Vertical Thickness (When Length = 145 cm): 98.0333

Part (c)
--------------------------------------
Power Function: H = (0.1230)*L^(1.3424)

Add a comment
Know the answer?
Add Answer to:
The following data are the shoulder-hip length and the vertical thickness of the bodies of some q...
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
  • The following data are the shoulder-hip length and the vertical thickness of the bodies of some q...

    The following data are the shoulder-hip length and the vertical thickness of the bodies of some quadrupeds at the zoo in Zurich, Switzerland. Find the log transformations needed to make this function linear. b) Predict the vertical thickness of a giraffe if the shoulder-hip length is 145 cm. c) Turn the linear equation into a power function (without logs). Animal Length (cm) Height (cm) Ermine Dacshund Indian Tiger 12 35 90 122 153 12 45 73 135 Llama Indian Elephant...

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