我在我的代码中写了一个错误案例,所以当
时if (condition 1)
error('Error \n(error message)',0)
然而,MatLab说'格式字符串可能与参数计数'
不一致我不确定为什么我收到此消息,错误消息不包含参数计数。
答案 0 :(得分:2)
error
表现为sprintf
。
使用
error('Error \n(error message)');
或
error('Error %d \n(error message)',0)
即,您可以引入一些格式说明符。