how can i get the nonzero value of Tdim{i}(1),while i have to start value of k=2:12?
3 views (last 30 days)
Show older comments
here is the result:
Tdim{1}
ans =
0
0.6810
0.7002
0.7326
0.7769
0.8241
0.8472
0.8241
0.7769
0.7326
0.7002
0.6810
here is the main code:
% calculation of Rs
theta=0:30*(pi/180):330*(pi/180);
x=ro*cos(theta);
y=ro*sin(theta);
y1=0;
rs=sqrt((x-e).^2+(y-y1).^2);
D=zeros(1000,12);
for i= 1:1000
for j=1:12
D(i,j)=rs(j)./ri(i);
end
end
D;
Rs=num2cell(D,2);
% Value of angle calculation
Tdimnot=(Thotspot-Tinf)./(Tref-Tinf);
alpha=atan2((y-y1),(x-e))*180/pi;
for k=1:12
if alpha(k)<0
alpha(k)=360+alpha(k);
else
alpha(k)= alpha(k);
end
end
for k=1:12
g(k)=alpha(k)*pi/180;
end
% calculation of 1000 matrix of (12,12)
N=1000;
C=cell(1,N);
for i=1:N
A=zeros(12,12);
for k=1:12
for j=1:12
if j==1
A(k,j)=1./(Rs{i}(k))+Bi(i).*log(Rs{i}(k));
else
A(k,j)=((j-1)*((Rs{i}(k)).^(j-1)+(Rs{i}(k)).^(1-j))./(Rs{i}(k))+Bi(i)*((Rs{i}(k)).^(j-1)-(Rs{i}(k)).^(1-j)))* cos((j-1).*g(k));
end
end
end
C{i}=A;
end
% Calculation of Y
N=1000;
Y=cell(1,N);
E=zeros(12,1);
for i=1:N
E=(C{i})\(B{i});
Y{i}=E;
end
% calculation of each 12 dimensionless temperature at pheripheral
N=1000;
Tdim=cell(1,N);
for i=1:N
F=zeros(12,1);
for k=2:12
F(k,:)=1+(Y{i}(1)).*log(Rs{i}(k))+(Y{i}(k))*((Rs{i}(k)).^(k-1)-(Rs{i}(k)).^(k-1)).*cos((k-1).*g(k));
end
Tdim{i}=F;
Please help me in this ,i am trynig to find for last 4 days.
0 Comments
Answers (0)
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!