Using an external script/function in simulink "matlab function block"

조회 수: 2 (최근 30일)
Netanel Sandman
Netanel Sandman 2020년 11월 16일
댓글: Jon 2020년 11월 16일
Hi,
i'm designing a simulation in simulink envolving thermodynamics.
I'm trying to find a way to insert a block which recieves a temperature and return a Linearly interpolated value of another parameter (density for instance) from an csv file.
I was trying to load the csv file as collumn vectors and it works fine outside the simulink function block. But trying to use the custom script inside the function block results always in errors.
is there any way to solve it or maybe an easier way to interpolate the values?
bear in mind that the input values change from iteration to iteration so this is why I need to interpolate it frequentlyy.
Many Thanks,
Netanel Sandman

채택된 답변

Jon
Jon 2020년 11월 16일
Will the 1-D interpolation block do what you need?
  댓글 수: 2
Netanel Sandman
Netanel Sandman 2020년 11월 16일
Wow.....Thanks :)
Can't Believe I've Spent 2 days trying to work around a problem that has a built in Block....
I really need to start exploring the different blocks available.
Jon
Jon 2020년 11월 16일
Good news. Glad to hear that solves your problem.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Thermal Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by