Matlab code to simulink

1 回表示 (過去 30 日間)
Luis Felipe Dos Santos Esteves
Luis Felipe Dos Santos Esteves 2019 年 6 月 5 日
回答済み: Munish Raj 2019 年 6 月 11 日
Hi,
I have the code:
% Pore
x1=0:0.1:1;
dp=0.4;
np=3;
R(x1)=exp(-(x1/dp)^np);
% Particle
x2=0:1:10;
db=5
nb=3
g(x2)= (nb/db)*(x2/db)^(1/nb)*exp(-(x1/db)^nb);
%Particles entering the membrane
gm=R(x1)*g(x2)
%Particles being retained
gc=(1-R(x1))*g(x2)
I would like to know how i could do it in simulink in order to get two results in the same graphic (gm and gc).
It is possible after that make an kind of animation? How?
Regards,
Luis

回答 (1 件)

Munish Raj
Munish Raj 2019 年 6 月 11 日
Hello Luis,
I understand that you want to incorporate a MATLAB code in SIMULINK.
This can be acheived using a MATLAB function block.
The documentation for the same can be found here.

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by