Question

A certain scientist collected Force data at the following accelerations, a, for each mass shown, m a: 1, 5, 10, 15, 20, 25, 3
A certain nuclear physicist collected the following data from a particle accelerator experiment 14 Mass (kg) Energy )x 10 0.0
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Code:

close all
clear
clc

% Exercise 5
fprintf('Exercise 5\n-------------------------------------------------------------\n')
a = [1 5 10 15 20 25 30 35 40 45];
m = [1 5 10 15];

F = zeros(length(m), length(a)); % Each row corresponds to a mass
disp('Force Vectors:')
colors = ['b', 'g', 'y', 'r'];
styles = ['d', 's', '*', '^'];
figure, hold on
for i = 1:length(m)
F(i,:) = m(i)*a;
fprintf('\tFor mass m = %d:\n\t', m(i)), disp(F(i,:))
plot(a, F(i,:), sprintf('-%s%s',colors(i), styles(i)))
end
xlabel('a (m/s^2)'), ylabel('F (N)'), title('F = ma for different masses')
legend('m = 1', 'm = 5', 'm = 10', 'm = 15', 'Location', 'northwest')
hold off

fprintf('\nExercise 6\n-------------------------------------------------------------\n')
M = 0.001:0.001:0.01; % Mass
E = [1.0 1.6 2.9 3.6 4.4 5.7 6.4 7.3 8.1 10]*1e14; % Energy

fprintf('INFO: polyfit(...) fits the data points to a polynomial of desired degree using least squares approach.\n\n')

% E = m*c^2 => E = a*m and we need to find a (polynomial of degree 1)
p = polyfit(M,E,1);
a = p(1);
fprintf('Obtained Model: E = (%e)*m\n', a)
fprintf('Speed of light, c: %e (m/s)\n', sqrt(a))

MM = linspace(min(M), max(M), 100);
EE = a*MM;
figure, plot(M,E/1e14,'o',MM,EE/1e14), xlabel('Mass (kg)'), ylabel('Energy (J) x 1e14')
legend('Data Points', 'Polynomial Fit', 'Location', 'northwest')
title('E = mc^2')

Output:

Exercise 5
-------------------------------------------------------------
Force Vectors:
   For mass m = 1:
   1 5 10 15 20 25 30 35 40 45
   For mass m = 5:
   5 25 50 75 100 125 150 175 200 225
   For mass m = 10:
   10 50 100 150 200 250 300 350 400 450
   For mass m = 15:
   15 75 150 225 300 375 450 525 600 675

Exercise 6
-------------------------------------------------------------
INFO: polyfit(...) fits the data points to a polynomial of desired degree using least squares approach.

Obtained Model: E = (9.587879e+16)*m
Speed of light, c: 3.096430e+08 (m/s)

Plots:

F ma for different masses 700 600 m= 10 m= 15 500 400 300 200 100 0 5 10 15 202530 35 4045 a (m/s)

E=mc2 10 O Data Points Polynomial Fit 7 0 4 8 9 10 × 10-3 3 4 7 Mass (kg)

Add a comment
Know the answer?
Add Answer to:
A certain scientist collected Force data at the following accelerations, a, for each mass shown, m...
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