我有以下问题:
y=5;
syms x;
z = 1:5;
solve(exp(x*max(z))/sum(exp(x*z))-y,x)
我得到的输出是:
z = 1:5;
Warning: The solutions are parametrized by the symbols:
z1 = {0.08428351324821874240165938567037 -
2.5448937468890335808057943875982*I, 0.027288262408886135481488159484547
- 1.2999621981120554573735787663938*I,
0.08428351324821874240165938567037 +
2.5448937468890335808057943875982*I, 0.027288262408886135481488159484547
+ 1.2999621981120554573735787663938*I}
> In solve at 94
ans =
z1
但是,我需要一个数字解决方案。任何人都可以推荐一种对菜鸟友好的方法吗?
谢谢!(感谢@horchler 帮我改写问题)