学习matlab/simulink时使用Memory模块和Trigger模块
报错:'XXX'has sample time [0, 1]. Only constant (inf) or inherited (-1) sample times are allowed in 'XXX'
![](https://img-blog.csdnimg.cn/img_convert/487e1d8e952182440c60359492a5db4f.png)
![](https://img-blog.csdnimg.cn/img_convert/69c1d8ba047c9dcda5a1754a1fcd298d.png)
说明memory模块设置不对
双击memory模块
解决办法:勾选Inherit sample time即可
![](https://img-blog.csdnimg.cn/img_convert/a950712c678ba651f1fd856ee8df3a04.png)
![](https://img-blog.csdnimg.cn/img_convert/b4669070d4b432c3714cb79ab76b5daf.png)
不报错了
![](https://img-blog.csdnimg.cn/img_convert/a449fd840548fb649a4b6ca8506e9f22.png)
解决一个小问题!
学习matlab/simulink时使用Memory模块和Trigger模块
报错:'XXX'has sample time [0, 1]. Only constant (inf) or inherited (-1) sample times are allowed in 'XXX'
说明memory模块设置不对
双击memory模块
解决办法:勾选Inherit sample time即可
不报错了
解决一个小问题!