From 1a6137d8d6f0182da39187244043b35bcd21b3b7 Mon Sep 17 00:00:00 2001 From: cjc13016 <31663413+cjc13016@users.noreply.github.com> Date: Thu, 14 Dec 2017 20:59:51 -0500 Subject: [PATCH] 1 --- README.md | 54 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 1f270d4..a4a26b7 100644 --- a/README.md +++ b/README.md @@ -206,75 +206,25 @@ For a given pressure range of 0.001 to 0.01 MPa with 10 steps, determine the mem Using the given pressure range, the tension is found at each different pressure value using the bisect method. From here, the deflection values at the calculated tensions and given pressures are found by calling the membrane_solution function from part C. The best fit line and coefficient are found using the built-in Matlab functions polyfit and polyval. These return a 4 x 1 matrix of coefficients, but since there is only one x term in the function (x^3), the first value in the matrix is determined to be the coefficient A. ```matlab -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD % This creates a plot for the max_w vs a given pressure clear P = linspace(0.001,0.01,10); % Assign the range of pressures used to find T % In order to find the tension the bisect method is used -======= -clear -P = linspace(0.001,0.01,10); - ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= -clear -P = linspace(0.001,0.01,10); - ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= -clear -P = linspace(0.001,0.01,10); - ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 for i = 1:length(P) func = @(T) SE_diff(T,P(i),10); [root(i),fx,ea,iter] = bisect_final_project(func,0.001,1,.1); end -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD % Each value of w is calculated using each root and pressure value -======= - ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= - ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= - ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 for i = 1:length(root) w = membrane_solution(root(i),P(i),10); w1(:,i) = w; end - -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -w_max = max(w1); % in order to get the w_max we take the maximum w value from each column of the w vector -coefficients = polyfit(w_max,P,3); -Y = polyval(coefficients,w_max); - -plot(w_max,P,w_max,Y,'or') % plot the w_max vs. the Pressure and include a cubic best fit curve. -======= -======= ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 +% in order to get the w_max we take the maximum w value from each column of the w vector w_max = max(w1); coefficients = polyfit(w_max,P,3); Y = polyval(coefficients,w_max); - +% plot the w_max vs. the Pressure and include a cubic best fit curve. plot(w_max,P,w_max,Y,'or') -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 -======= ->>>>>>> 3daf399f8af002d376801f3e913283aac67f17f2 xlabel('Max Deflection (micron)') ylabel('Pressure (MPa)') title('Pressure vs. Maximum Deflection')