Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
% Part G Script
% From Problem Statement
P=0.001;
n = 5:5:50;
% Sets vector length so it doesn't change every iteration in for loop
a = zeros(1,length(n));
% Uses tension_sol and membrane_solution functions along with a regression line to solve for the constant A in the regression line
for i = 1:length(n)
T = tension_sol(P,n(i));
w = membrane_solution(T,P,n(i));
wmax = max(w);
x = wmax';
y = P';
Z = x.^3;
a(i) = Z\y;
end
% Calculates the relative error between the constant A values
Rel_error(a)