Info

This question is closed. Reopen it to edit or answer.

need help solving for a variable.

1 view (last 30 days)
Ross
Ross on 18 Nov 2011
Closed: MATLAB Answer Bot on 20 Aug 2021
I'm pretty new to matlab, could anyone help me solve this equation, the unknown is yy, everything else is a 1x1700 matrix.
0=(Ta2-TL1)+(yy./(S+yy)).*(((Rnet-Ems*5.56e-8*((Ta2+273.15).^4))./(29.*ghr))-(Diff./(yy*p)))
Thanks

Answers (1)

Walter Roberson
Walter Roberson on 18 Nov 2011
Is the "Diff" intended to refer to a differentiation? If so, of what expression with respect to which variable?
Your tags mention "dsolve" but unless "Diff" refers to differentiation, there does not appear to be any ODE here.
I notice that you wrote (yy*p) near the end, which is matrix multiplication. If yy is the same shape as p, 1x1700, then the matrix multiplication would not succeed as the inner dimensions of the matrix multiplication would not match. In order to work, yy would have to be 1700x1. But if yy is 1700x1 then S+yy would be a 1x1700 plus a 1700x1 which would fail. From this can we deduce that yy*p should instead be yy.*p ?
If yy*p should be yy.*p and Diff is just another vector, then this appears to just become a vectorized algebraic formula with a standard solution,
yy = -29 .* ghr .* (p .* (-Ta2 + TL1) .*S + Diff) ./ ((Ems .* 5.56e-8 .* (Ta2 + 273.15) .^4 - 29 .* Ta2 .* ghr + 29 .* ghr .* TL1 - Rnet) .*p)

Products

Community Treasure Hunt

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

Start Hunting!