Error while working with multiple nodes
显示 更早的评论
Hello Everyone,
I am working with 803 node points to simulate the temperature effect. is there any way to assign the same initial condition for the loop?
Also while working the loop is showing error, so can anyone help me with this?
Please find the codes as below:
T803(1) = 298 %upto T1(1) = 298, for all nodes, initial condition of loop is same i.e. 298.
T802(1) = 298
T801(1) = 298
.
.
.
.
.
T1(1) = 298
for i = 1:100000
T803(1) = 2 * Foc * [T802(i) + T_inf * Bic + ((q * x)/k_c )] + [1 - (2 * Foc) - (2 * Foc * Bic)] * T803(i)
T802(1) = Foc * [T801(i) + T803(i)] + [1 - 2 * Foc] * T802(i)
T801(1) = Foc [T800(i) + T802(i)] + [1 - 2 * Fot] * T801(i)
for j = 800:-1:2
T(j)(1) = Foc [T(j-1)(i) + T(j+1)(i)] + [1 - 2 * Fot] * T(j)(i)
end
T1(1) = 2 * Fot * [T2(i) + Bit * 25] + [1 + (2 * Fot) - (2 * Fot * Bit)] * T0(i)
end
回答(1 个)
Walter Roberson
2016-4-12
0 个投票
The way to assign the same initial condition is to not use numbered variables. http://www.mathworks.com/matlabcentral/answers/277356-i-am-working-with-1205-arrays-for-simulation-i-need-zero-vectors#answer_216605
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with Fixed-Point Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!