A 'cvx_status=='Solved' if statement problem

Hello, can I ask a question about my code. Here, I would like to write a if statement to judge whether my question is solvable or not. The picture is shown below~ if the cvx_status is ‘Solved’, the if else statement works successfully. However, as long as the result shows other status i.e. ‘Inaccurate/Solved’, the error will occur which is shown in the picture. Could you please help me find a solution since this if statement is very important to my algorithm. Thank you very much !!!

this is a matlab question. try strcmp() or contains()

Wow, it works, thank you for your kind help.