Yalmip: sdpvar variable print issue

23 次查看(过去 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