Difference between revisions of "Team:Dundee/Modeling/Appendix3"

Line 169: Line 169:
 
                 <h3>Bone Incision Experiment Code</h3>
 
                 <h3>Bone Incision Experiment Code</h3>
 
             <p><font color="white"><!--Font colour is set as white-->  
 
             <p><font color="white"><!--Font colour is set as white-->  
The following tables show the raw data collected from the experiment as well as the results from data analysis. It was these results which were plotted to find a value for the wear coefficient, k.
+
code.</font></p>
 
+
</font></p>
+
 
</div>
 
</div>
 +
 +
 +
<div class="content"><pre class="codeinput"><!--This marks the beginning of the input copied from matlab published html.-->
 +
  <span class="comment"><b><font size='6' color='green'>MATLAB code from bone.m file</b></font></span>
 +
 +
 +
  </style></head><body><div class="content"><pre class="codeinput">k=6.23*10^(-9);<span class="comment">%wear coefficient</span>
 +
W=zeros(1,101);<span class="comment">%zero vector for calculated volume of bone incision m^3</span>
 +
s=(0:0.001:0.1);<span class="comment">%range of values for blade length m, from 0 to 10cm</span>
 +
p=(0:2:200);<span class="comment">%range of values for applied force N, from 0 to 200N</span>
 +
 +
<span class="keyword">for</span> i=1:101
 +
    <span class="keyword">for</span> j=1:101
 +
    W(i,j)=k*p(i)*s(j); <span class="comment">%Archards Equation in two for loops</span>
 +
    <span class="comment">%to create a matrix of possible values for volume</span>
 +
<span class="keyword">end</span>
 +
<span class="keyword">end</span>
 +
 +
surf(p,s,W)<span class="comment">%creates a surface plot, where the height and therefore colour are dependand on the matric W</span>
 +
grid <span class="string">on</span>
 +
title(<span class="string">'Relationship Between Volume of Bone Incison, Force and Blade length'</span>)
 +
zlabel(<span class="string">'Volume of Incision/m^3'</span>)
 +
ylabel(<span class="string">'Blade Length/m'</span>)
 +
xlabel(<span class="string">'Applied Load/N'</span>)
 +
<p class="footer" colour="black;"><br><a href="http://www.mathworks.com/products/matlab/">Published with MATLAB® R2015a</a><br></p></div><!--
 +
##### SOURCE BEGIN #####
 +
k=6.23*10^(-9);%wear coefficient
 +
W=zeros(1,101);%zero vector for calculated volume of bone incision m^3
 +
s=(0:0.001:0.1);%range of values for blade length m, from 0 to 10cm
 +
p=(0:2:200);%range of values for applied force N, from 0 to 200N
 +
 +
for i=1:101
 +
    for j=1:101
 +
    W(i,j)=k*p(i)*s(j); %Archards Equation in two for loops
 +
    %to create a matrix of possible values for volume
 +
end
 +
end
 +
 +
surf(p,s,W)%creates a surface plot, where the height and therefore colour are dependand on the matric W
 +
grid on
 +
title('Relationship Between Volume of Bone Incison, Force and Blade length')
 +
zlabel('Volume of Incision/m^3')
 +
ylabel('Blade Length/m')
 +
xlabel('Applied Load/N')
 +
 
               </div>   
 
               </div>   
 
  <a href="#selection" class="btn btn-primary btn-lg pull-right" role="button">Back to Top</a>  <!--Button that navigates back to top-->
 
  <a href="#selection" class="btn btn-primary btn-lg pull-right" role="button">Back to Top</a>  <!--Button that navigates back to top-->

Revision as of 16:48, 19 August 2015

Dry Lab

Appendix 3: Chromate Biosensor Code

Chromate Model Code

MATLAB code for chromate model.

Bone Incision Experimental Data

Raw data for the bone incision experiments.

Bone Incision Experiment Code

MATLAB code for the bone incision experiments.

Chromate Model Code

Lorem ipsum dolor sit amet, nostrud maiestatis quaerendum ne sed. Reque possit ne sea. Te dico labitur mediocritatem ius. Error timeam noluisse eos ad, eam ne magna meliore contentiones, nec ei volumus persecuti. Dicit animal definitionem et mel, nonumy tacimates nec in. Vis mucius periculis at. At est vidit scripserit repudiandae, agam porro sea ne. Sea et stet tibique praesent, vim et legere aperiri. Quo doming vocibus eleifend no. Cu vis partem graeci facilisis. Falli inciderint mei no. Assentior suscipiantur mea id. Vis quas electram prodesset cu, choro omnium conclusionemque an his. Vis latine equidem perfecto ad.

Back to Top View Description of Model

Bone Incision Data

Lorem ipsum dolor sit amet, nostrud maiestatis quaerendum ne sed. Reque possit ne sea. Te dico labitur mediocritatem ius. Error timeam noluisse eos ad, eam ne magna meliore contentiones, nec ei volumus persecuti. Dicit animal definitionem et mel, nonumy tacimates nec in. Vis mucius periculis at. At est vidit scripserit repudiandae, agam porro sea ne. Sea et stet tibique praesent, vim et legere aperiri. Quo doming vocibus eleifend no. Cu vis partem graeci facilisis. Falli inciderint mei no. Assentior suscipiantur mea id. Vis quas electram prodesset cu, choro omnium conclusionemque an his. Vis latine equidem perfecto ad.

Bone Incision Experiment Code

code.


  MATLAB code from bone.m file


  
k=6.23*10^(-9);%wear coefficient
W=zeros(1,101);%zero vector for calculated volume of bone incision m^3
s=(0:0.001:0.1);%range of values for blade length m, from 0 to 10cm
p=(0:2:200);%range of values for applied force N, from 0 to 200N

for i=1:101
    for j=1:101
    W(i,j)=k*p(i)*s(j); %Archards Equation in two for loops
    %to create a matrix of possible values for volume
end
end

surf(p,s,W)%creates a surface plot, where the height and therefore colour are dependand on the matric W
grid on
title('Relationship Between Volume of Bone Incison, Force and Blade length')
zlabel('Volume of Incision/m^3')
ylabel('Blade Length/m')
xlabel('Applied Load/N')
View Description of Experiment

To see the MATLAB code for the BioSpray section of the project or the Fingerprint Aging section of the project use the following buttons.

Appendix 2: Fingerprint Aging Appendix 1: BioSpray