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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!