I can't detect error in formula
Mostrar comentarios más antiguos
There's an error in this code which I failed to detect. Hopefully someone can help me. Thank you in advance.
T3(t,1)=(((q_inc*z_env*d_abs)*((1/zeta3)+((1-zeta4)*delta3/(zeta4*delta4)))+sigma*pi*delta3*(T4(t,1))^4)/(sigma*pi*delta3))^(1/4);
Also, I am also don't understand what does the picture means. Im still new with MATLAB.
Respuestas (2)
Sulaymon Eshkabilov
el 13 de Jun. de 2021
Without the knowledge of your variables and their size, one point is clear that is an elementwise operation is needed for * and /. Thus, .* and ./ are to be introduced in the equation, see e.g.:
T3(t,1)=(((q_inc*z_env*d_abs).*((1./zeta3)+((1-zeta4).*delta3./(zeta4.*delta4)))+sigma.*pi*delta3.*(T4(t,1)).^4)./(sigma.*pi*delta3)).^(1/4);
Star Strider
el 13 de Jun. de 2021
The error indicates that the exponentiation needs to be element-wise, using .^ rather than ^ —
T3(t,1)=(((q_inc.*z_env.*d_abs).*((1./zeta3)+((1-zeta4).*delta3./(zeta4.*delta4)))+sigma.*pi.*delta3.*(T4(t,1)).^4)./(sigma.*pi.*delta3)).^(1/4);
(This makes all the operations element-wise.) However, unless all the vectors are column vectors, and ‘t’ is an integer greater than 0, the assignment is going to fail.
.
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!