更新时间:2022-05-13 03:30:38
您可以使用匿名帮助程序功能来避免语法限制. EG
You can get around syntax limitations with anonymous helper functions. EG
oneD = @(x)x(:); diff = sum(abs(oneD(a-b))));
不过还是需要两行.
是否可以在MATLAB中的表达式上应用冒号运算符?