How to find unknown in the equation
7 views (last 30 days)
How to find w in equation 2. Below is my code i dont know what seems to be the problem.
sol = solve(r.*(1+(a./c).*w)==p) % equation 2
vpa( sol )
Star Strider on 24 Mar 2021
Since ‘p’ is a vector, probably the easiest way to do this is to use a loop:
for k = 1:numel(p)
sol(k) = vpasolve(r.*(1+(a./c).*w)==p(k)) % equation 2
Thagt gives 11 values for ‘‘w’.