Effacer les filtres
Effacer les filtres

Yalmip: sdpvar variable print issue

22 vues (au cours des 30 derniers jours)
Suman Maiti
Suman Maiti le 2 Mar 2022
Réponse apportée : Ninad le 20 Jan 2024
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.

Réponses (1)

Ninad
Ninad le 20 Jan 2024
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

Community Treasure Hunt

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

Start Hunting!

Translated by