필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to form a simulink block for MATLAB code ?

조회 수: 1 (최근 30일)
satheeshkumar satheeshkumar M
satheeshkumar satheeshkumar M 2017년 11월 1일
마감: MATLAB Answer Bot 2021년 8월 20일
How to form a simulink block for my MATLAB code? i want to make these index assignment as a plant model in simulink. i m new to matlab,simulink. please provide me simulink block for the following.
p(p>65.675 & p<66.2375)=p(p>65.675 & p<66.2375)+0.5625
p1=p
p1(p1>64.55 & p1<65.675)=p1(p1>64.55 & p1<65.675)+1.125
p2=p1
p2(p2>62.3 & p2<64.55)=p2(p2>62.3 & p2<64.55)+2.25
p3=p2
p3(p3>57.8 & p3<62.3)=p3(p3>57.8 & p3<62.3)+4.5
p4=p3
p4(p4<57.8)=p4(p4<57.8)+9
p5=p4

답변 (1개)

Sebastian Castro
Sebastian Castro 2017년 11월 1일
There is a MATLAB Function block you can use to insert your code in there:
Normally, I'd suggest reimplementing things in Simulink blocks, but since you're doing logical indexing I think MATLAB is the right tool for the job :)
- Sebastian
  댓글 수: 1
satheeshkumar satheeshkumar M
satheeshkumar satheeshkumar M 2017년 11월 1일
Actually i m simulating a neural network predictive controller in simulink, in that my plant model is the above assignment. help me how to make this function block for my matlab code.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by