Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Problem in using syms operator

조회 수: 7 (최근 30일)
Parikshit  Sharma
Parikshit Sharma 2017년 9월 24일
마감: MATLAB Answer Bot 2021년 8월 20일
I wanted to minimize a function involving sums of products over a range [0,x(1)] where x(1) is my variable, when i write my objective function using syms,iteration starts in genetic algorithm solver but it doesn't provide me any solution. But when i write the same function using 'for loops' then it give me solution very quickly. Why is this happening that writing same function with syms creating problem but not while using loop?
  댓글 수: 1
John D'Errico
John D'Errico 2017년 9월 24일
편집: John D'Errico 2017년 9월 24일
Huh? syms does not use a genetic algorithm solver. As for the use of for loops, we can have no idea what you did. Odds are your solution, if you are doing a brute force search using loops, then it will not be very accurate.
So you need to explain your question. It may be that you are using solve to try to solve a problem with no analytical solution. So solve will keep working, not knowing there is no analytical solution. Or,if you have all numerical coefficients, solve will be trying to compute a solution with essentially thousands of digits in the result. Of course that will be extremely computationally intensive. Yet you can still find a (relatively poor) solution using brute force loops, accurate to perhaps one or two decimal digits in some cases.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by