matlab simout,每日学习Matlab(2)

1.simulink里matlab function模块的output width是用来定义输出矩阵的大小。

2.>>

plot(tout,simout(:,2),tout,simout(:,3))

Warning: Using a default value of 0.2 for maximum step

size. The simulation step size will be equal to

or less than this value. You can disable this

diagnostic by setting 'Automatic solver parameter selection'

diagnostic to 'none' in the Diagnostics page of the configuration

parameters dialog.

这是因为Configuration Parameter里Max step

size设为auto或者0.2。之所以为0.2是因为图形轴或示波器时间轴为10s,默认采样点为50,0.2=(10-0)/50

。Max step

size 一定要小于等于0.2,该值越小绘制的图形越平滑,但计算量越大

3.消除该警告

Warning: Using a default value of 0.2 for maximum step

size. The simulation

step size will be equal to or less than this

value. You can disable this

diagnostic by setting 'Automatic solver parameter selection'

diagnostic to

'none' in the Diagnostics page of the configuration parameters

dialog

方法:simulink->configuration

parameter-> Max step size:auto,

将要可变步长的最大步长改为小于0.2,就可以消除改警告。但不要太小。

4.

Warning: Output port 4 of 'tryagain/Demux' is not connected.

方法:将未使用输出连接到sink下的terminal功能块就行。

5.

输出到工作空间的数据为结构体表示形式,这样占得空间小,但不便于使用了!为了将输出到工作空间

的数据保存为数组形式,使用输出到工作空间块,一定要将下面的输出类型有:structure->array.

6.

更改仿真步长设置、采用的仿真算法、仿真时间,都可以在simulink->configuration

parameter下

进行更改。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值