Code generation for "quadprog"
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
1 개 추천
Hi, I am trying to get code generation for "quadprog", I am getting error message "Function 'optimoptions' not supported for code generation". I am using MATLAB2018b. What might be the possible solutions?
채택된 답변
Ameer Hamza
2020년 11월 11일
3 개 추천
Code generation for optimoptions is only enabled in R2020b, and for quadprog(), it was enabled in R2020a. There is no way to get it in R2018b.
댓글 수: 13
KEERTHI CHACKO
2020년 11월 11일
Thank you
Ameer Hamza
2020년 11월 11일
I am glad to be of help!
li gu
2021년 3월 8일
I want to ask why I upgrade matlab to 2020, but still report an error to show that this function cannot generate code?
Steven Lord
2021년 3월 8일
Did you upgrade to release R2020a or release R2020b?
li gu
2021년 3월 8일
Upgrade 2020b, and I read the quadprog document. It's different from the previous version. It does have an extension function, which is to generate C code, but there are several restrictions. Then I modify the code one by one according to the conditions, basically meeting the requirements. I do hardware in the loop simulation, and need to compile to generate code. However, because this function compiles, it will still report an error. The error is as follows
“The extrinsic function 'quadprog' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated because its outputs appear to influence the calling function. Fix this error by not using 'quadprog' or by ensuring that its outputs are unused.”
Alan Weiss
2021년 3월 9일
Can you run the example Generate Code for quadprog? If not, then I suggest that you contact technical support. If so, then the fault is somewhere else in your code, because quadprog is supported.
Alan Weiss
MATLAB mathematical toolbox documentation
li gu
2021년 3월 10일
Later I ran this example and found the problem. Matlab did not find a supported compiler. Then I downloaded the MinGW-w64 C/C++ compiler. I ran this example successfully, but my hardware device supports VS software. , I downloaded VS2015 on my computer before, but why the VS compiler cannot be displayed when MATLAB runs the mex -setup command? I reinstalled VS2017 and MATLAB2020, but still can’t find the compiler. How can I solve this problem ?
li gu
2021년 3월 10일
Now matlab (2020b) has found a supported compiler (vs2017), but I still report an error in the process of compiling the model (The extrinsic function 'quadprog' is not available for standalone code generation). Previously, I used MinGW compiler to try to generate code for quadprog test cases, but the hardware in the loop simulation I did only supports vs compiler, so how can I solve this problem?
li gu
2021년 3월 10일

li gu
2021년 3월 10일

li gu
2021년 3월 10일
The above two figures are the established Simulink model and the self-defined AdaptiveMPC function in the model. There is a quadratic programming solving function quadprog in the function. The error is that this function cannot generate code.
li gu
2021년 3월 10일
Just now, it is OK to generate the test example of Quadlog function with vs2017 compiler. However, compiling my model will report the error that the Quadlog function cannot generate code.
GE YINBO
2021년 9월 30일
Dear li, has your hardware in the loop simulation with quadprog been implemented.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB Coder에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
