How to make the sovler faster?
5 ビュー (過去 30 日間)
古いコメントを表示
Hi
I am trying to solve this equation for Nf, but every time the solver takes long time, how it is possible to make the solver faster?
Machalife = round(solve(maximumLHS == .5*((((fsc^2)/E)*(Nf)^(2*fse)) + (fsc*fdc*(Nf)^(fse+fde))), Nf))
any help?
0 件のコメント
回答 (2 件)
Kwen
2013 年 7 月 2 日
I think you can change which numerical method you use, in order to choose one that finds your value faster. There's a few that allow you to start searching at a specific value as well...other than that computational power will help but it is slow in general since there are so many computations to be done normally.
0 件のコメント
Ian Wood
2013 年 7 月 2 日
Generally if your variables are dependent on multiple other variables, it takes a longer time to reach the solution, as MATLAB must access variables inside of variables. This takes a lot more memory to do. If you can find a way to solve that equation with the least number of variables possible, you should find that MATLAB can solve your problem much quicker.
As an example, say that fsc and fse are dependent on fsd (i'm not sure if this is the case or not):
fsd = fsc + fse;
you are actually better off inserting "fsc + fse" instead of creating a new variable "fsd" to solve your problem, since fsd requires access to fsc and fse to be created, thus requiring more memory. Also, if fsc and fse have references to other variables, then you are just piling memory on top of memory required to be accessed.
That's why it can take such a long time for an equation to be solved with so many variables involved. Your equation will be longer but you'll find that it can be solved in a much shorter amount of time.
Hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!