不能转化为显式的函数 多个函数值 求 自变量。
Show older comments

现在有很多b值,需要求解对应的a值,我利用了下面的代码,可以求出结果,但效率有点低(大约需要30s),请问大家,这个有优化的方法吗?
先定义一个函数
function y=kine2222(b)
syms a;
y1=solve(b-(a+(1-a)*log(1-a)),a);
y=eval(y1);
再使用arrayfun
b=[1:1:100];
arrayfun(@(b)kine2222(b),b)
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!