Hi,
I understand that you are getting an error while using “str2sym” function. I tried to understand the possible reasons behind it.
You might be getting this error because “str2sym” function is a part of Symbolic Math Toolbox. You will need to install Symbolic Math Toolbox in Additional Explorer to make use of this function.
You can go through the following documentation for more details about the Symbolic Math Toolbox.
I hope it helps.
Thanks!!