Solving equation with two variables, and giving the result for one as a function of the other
1 次查看(过去 30 天)
显示 更早的评论
I have an equation with two variables (Alpha, and Ze_grad), i wont an equation that locks like Alpha= f(Ze_grad), but i cant do that!
mfreqs=[200 5000];
syms Alpha Ze_grad
Zm = 1./((2i*pi*mfreqs).^Alpha);
Zm_grad = (imag(Zm(2))-imag(Zm(1)))/(real(Zm(2))-real(Zm(1)));
equ= Zm_grad - Ze_grad == 0 ;
alpha = solve(equ, Alpha)
采纳的回答
Torsten
2022-7-8
编辑:Torsten
2022-7-8
Alpha0 = 2.0;
Ze_grad = 3.0;
Alpha = fsolve(@(x)fun(x,Ze_grad),Alpha0)
fun(Alpha,Ze_grad)
function res = fun(Alpha,Ze_grad)
mfreqs=[200 5000];
Zm = 1./((2i*pi*mfreqs).^Alpha);
Zm_grad = (imag(Zm(2))-imag(Zm(1)))/(real(Zm(2))-real(Zm(1)));
res = abs(Zm_grad - Ze_grad);
end
9 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Equation Solving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!