Create a function in simulink

조회 수: 2 (최근 30일)
Khalid
Khalid 2016년 9월 27일
편집: Khalid 2016년 11월 13일
Hi guys,
I'm working in circuit breaker switching and I would like to ask if I want to create a function in simulink (ode23s) to call a data from workspace or if there is an easy way to take the measurement direct from block measurement: v(:,1), i(:,1), g, po, and a.
to make the calculation for the following formula: g=i./v; P=v.*i; PP=po.*g.^a; % note po & a are constant.
Thanks in advance for your attention.

채택된 답변

INFOZOU
INFOZOU 2016년 10월 4일
You can use the block "from workspace" from * * sources** in Simulink. For your case, you can use directly "reshape", "add", "product" and divide blocks from * *Math operation** in Simulink.
  댓글 수: 2
Khalid
Khalid 2016년 10월 5일
Thanks Lilia, I tried before but the shape it seems a bit different from what I'm expecting not the same 100% compare to when I do a direct calculation.
INFOZOU
INFOZOU 2016년 10월 6일
Not at all, I hope that you find a solution and I help you. May be, you should add clock and save it to workspace. In addition, you do not obtain the same curve, may be, because the horizontal axis is not the same.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Switches and Breakers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by