Hi Peter,
If you're using MATLAB version R2016b or newer, you can use "string(sol)" to convert the solution to a string format.
For versions older than R2016b, please use "char(sol)" to achieve the same outcome.
Below is a code snippet for your reference:
>> solChar = string(sol);
I hope you find this information helpful.
Regards,
Ninad