MATLAB è Simulink íà ðóññêîì

https://hub.exponenta.ru/

Simulink

Simulink

10.

, , ( ). , , - . . 10.1.

10.1.

Signal Generator, Constant Sum Sine Wave. S- Frequency Sine Wave. . 10.2. , .

10.2.

S- :

function [sys,x0,str,ts] = Var_param_1(t,x,u,flag)
%
switch flag,
case 0,
[sys,x0,str,ts]=mdlInitializeSizes;
case 3,
sys=mdlOutputs(t,x,u);
case {1,2,4,9}
sys=[]; % do nothing
otherwise
error(['Unhandled flag = ',num2str(flag)]);
end
%
function [sys,x0,str,ts]=mdlInitializeSizes
%
sizes = simsizes;
sizes.NumContStates = 0;
sizes.NumDiscStates = 0;
sizes.NumOutputs = 0;
sizes.NumInputs = 1;
sizes.DirFeedthrough = 1;
sizes.NumSampleTimes = 1;
sys = simsizes(sizes);
x0 = [];
str = [];
ts = [0 0];
%
function sys=mdlOutputs(t,x,u)
set_param('FAQ_Var_param_1/Sine Wave','Frequency',num2str(u*2*3.1415926))
%
sys = [];

set_param, , . num2str . u S- ( 2*3.1415926 /).

[ ]

 


:


 Orphus