Matlab中创建字符变量时,出现Character vectors and strings in the first argument can only specify a variable or number. Toevaluate character vectors and strings representing symbolic expressions报错,但是其他小伙伴的却没有这种问题。
问题再于,高版本Matlab中sym函数已经不再使用,改用str2sym函数,也就是sym过时啦!
解决!
补充,其实sym并没有完全被废除,它只能不再能创建字符串变量,但是仍可以创建单个字符变量。