Yalmip: sdpvar variable print issue

조회 수: 22 (최근 30일)
Suman Maiti
Suman Maiti 2022년 3월 2일
답변: Ninad 2024년 1월 20일
I am using Yalmip for solving an optimization problem related to my project. After successful optimization, I get a sdpvar output variable with size of 100x150. I want to print the values associated with my variable. However, it is taking a extreme amount of time if we store in an array and print the array. Similarly, I used the value funtion to get the numerical values of my variable and print it. However, it still costs a long amount of time.
It will be really helpful if you can help me print the sdpvar variable in an efficient manner.

답변 (1개)

Ninad
Ninad 2024년 1월 20일
Hi Suman,
As per my understanding, you are using "YALMIP" to solve an optimization problem. You have obtained an "sdpvar" output variable with size of 100x150. You are looking for an efficient way to print the sdpvar variable, because storing the value of "sdpvar" variable in an array and printing it is taking a long amount of time. The use of "value" function to do the same is also consuming a lot of time.
To display the values of an "sdpvar" variable in an efficient manner, you can use the "sdisplay" function in YALMIP. "sdisplay" (symbolic display) tries to display an "sdpvar" object in symbolic MATLAB form.
Please refer the following link to know how to use the "sdisplay" function:
Hope this helps.
Regards
Ninad

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by