I can't detect error in formula

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.

Réponses (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 13 Juin 2021

0 votes

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
Star Strider le 13 Juin 2021

0 votes

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.
.

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by