Question
Why wont my MATLAB codes work? The error is in the last line, Im not sure how to fix them. clear, clc gen=0; x=0.005; k=386;
Why wont my MATLAB codes work? The error is in the last line, Im not sure how to fix them.
clear, clc
gen=0;
x=0.005;
k=386;
h=40;
Tinf=30;
T0=100;
D=0.0025;
A=(3.141592*(D^2))/4;
p=3.141592*D;
syms T1 T2 T3 T4 T5 T6
eqns=[(k*A*(T0-T1)/x+k*A*(T2-T1)/x+h*A*(Tinf-T1)==0),...
((k*A*(T1-T2)/x+k*A*(T3-T2)/x+h*A*(Tinf-T2)==0)),...
((k*A*(T2-T3)/x+k*A*(T4-T3)/x+h*A*(Tinf-T3)==0)),...
((k*A*(T3-T4)/x+k*A*(T5-T4)/x+h*A*(Tinf-T4)==0)),...
((k*A*(T5-T6)/x+h*((p*x/2)+A)*(Tinf-T6)));
[A,bb]=equationsToMatrix(eqns,T1,T2,T3,T4,T5,T6);
z=vpa((A\bb),6);
clear, clc
gen=0;
x=0.01;
k=440;
h=150;
Tinf=15;
T0=300;
D=0.01;
A=(3.141592*(D^2))/4;
p=3.141592*D;
syms T1 T2 T3 T4 T5 T5
eqns=[(T0-T1+T2+((h*p*(x^2))/k*A)*(Tinf-T1)==0),...
((T1-T2+T3+((h*p*(x^2))/k*A)*(Tinf-T2))==0),...
((T2-T3+T4+((h*p*(x^2))/k*A)*(Tinf-T3))==0),...
((T3-T4+T5+((h*p*(x^2))/k*A)*(Tinf-T4))==0),...
((2*k*A*((T4-T5)/x)+h*p*x(Tinf-T5)==0));
[A,bb]=equationsToMatrix(eqns,T1,T2,T3,T4,T5,T5)
z=vpa((A\bb),5)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started