From 37ced14ffc84b50ddeefa972af403801167eddf1 Mon Sep 17 00:00:00 2001 From: cjc13016 <31663413+cjc13016@users.noreply.github.com> Date: Thu, 14 Dec 2017 15:27:14 -0500 Subject: [PATCH] 1 --- partg.m | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/partg.m b/partg.m index 7efbcc3..1ef04b4 100644 --- a/partg.m +++ b/partg.m @@ -1,5 +1,16 @@ -for P = [0.001:0.01:10] - [pw_se,w] = SE_diff(T,P,n); - [root,fx,ea,iter] = bisect_final_project(@(T) SE_diff(T,P,40),-5,10,.1); - disp(root) -end \ No newline at end of file + +P = linspace(0.001,0.01,10); + +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 + +for i = 1:length(root) + w = membrane_solution(root(i),P(i),10); + w1(:,i) = w; % displays w values as column +end + +w_max = max(w1); +v_cub = interp1(w_max,P,'pchip'); +plot(w_max,P) \ No newline at end of file