필터 지우기
필터 지우기

How can i derivate/integrate a function f(x) in Simulink using MATLAB?

조회 수: 1 (최근 30일)
Leone Altamura
Leone Altamura 2018년 2월 22일
답변: lokender Rawat 2018년 3월 5일
Hello, i can't run through this problem. I have a function:
y=1-exp((-x/a)^b)
I would like to get its derivate and, after that, integrate the new function multiplied by (pi/6)*x^3. I did the derivate using Matlab Command Window then i tried to integrate with MATLAB, but i solve it only in a script, which couldn't actually introduce in my Simulink model.
f=@intVolums;
q=integral(f,5,100);
function y = intVolums(x)
k1=0.65;
k2=-0.6;
k3=1;
y=(pi./6).*(x.^3).*k1.*exp(k2.*(x.^k3));
end
k1,k2,k3 are costant parameters obtained by the first function derivation. I'm new in Simulink modelling so i need help or to have Simulink solve these operations, or to introduce the scripts I made with MATLAB into the model. It is quite urgent. Thanks

답변 (1개)

lokender Rawat
lokender Rawat 2018년 3월 5일
As you have already written the MATLAB script for the task. You can directly use "MATLAB function block" in Simulink and insert your code into that block.
You can read more on "MATLAB function block":

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by