フィルターのクリア

vpasolve/solve not returning all answers

64 ビュー (過去 30 日間)
Daniel Wildermuth
Daniel Wildermuth 2021 年 5 月 19 日
回答済み: Shashank Gupta 2021 年 5 月 26 日
Hello everyone,
my code doesnt act like i want him to...
thats the code:
y = 1.1*x.^3+400*x.^2-5.5*10^5*x-9.7*10.^6+exp(-(x+1111));
syms x;
Nullstellen = vpasolve(y);
fprintf('Nullstellen: %f\n',Nullstellen);
yx = diff(y);
XPx = vpasolve(yx)
ive tried it also with solve.. i dont know how to get complex solutions and XPx only gets one solutions but it has to be three..
Thanks in advance!

回答 (1 件)

Shashank Gupta
Shashank Gupta 2021 年 5 月 26 日
Hi Daniel,
I see the equation contain exponential terms. There is no way to ask for more than one solution when the input to vpasolve is not a polynomial equation. This is because the approach to solving equations is numerical, and there is no way to know how many solutions actually exist. If you want to know in detail about how to get multiple solution using vpasolve function, check out this link. Or even you can set "random" flag in the function to get other solution, more detail can be found out here. I see your other 2 solution must be conjugate complex solutions but vpasolve or even solve function won't be able to these complex solution because of presence of exponential terms.
I hope this helps.
Cheers.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by