查看: 275|回复: 2|关注: 0

simulink的demo中的source code描述的看不懂,该怎么去理解它?求大神解析

[复制链接]

新手

5 麦片

财富积分


050


1

主题

4

帖子

0

最佳答案
发表于 2019-5-13 22:50:18 | 显示全部楼层 |阅读模式
例如:(在matlab的底层文件中,是否有对应的函数代码之类的?在哪?)
component torque
% Ideal Torque Sensor
% The block represents an ideal torque sensor, that is, a device that
% converts a variable passing through the sensor into a control signal
% proportional to the torque with a specified coefficient of proportionality.
% The sensor is ideal since it does not account for inertia, friction,
% delays, energy consumption, and so on.
%
% Connections R and C are mechanical rotational conserving ports
% that connect the sensor to the line whose torque is being
% monitored. Connection T is a physical signal port that outputs
% the measurement result. The sensor positive direction is from port R to
% port C.
% Copyright 2005-2013 The MathWorks, Inc.
nodes
    R = foundation.mechanical.rotational.rotational; % R:left
    C = foundation.mechanical.rotational.rotational; % C:right
end
outputs
    T = { 0, 'N*m' }; % T:right
end
variables(Access = protected)
    w = { 0, 'rad/s' };     % Angular velocity
    t = { 0, 'N*m' };       % Torque
end
branches
    t : R.t -> C.t;
end
equations
    w == R.w - C.w;
    w == 0;
    t == T;
end
end

新手

5 麦片

财富积分


050


1

主题

4

帖子

0

最佳答案
 楼主| 发表于 2019-5-13 22:51:22 | 显示全部楼层
:):):):):)

新手

5 麦片

财富积分


050


1

主题

4

帖子

0

最佳答案
 楼主| 发表于 2019-5-14 21:33:56 | 显示全部楼层
有大神详细解说一下的嘛
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

快速回复 返回顶部 返回列表