I need to create a for, if or while loop on simulink for repetitive calculation until meeting a criterion

조회 수: 2 (최근 30일)
Hello everybody!
I need to create a loop (i guess with using for and if statements) especially on Simulink.
I have a complex setup, therefore I'll ask my question on a much simpler example.
Let's say I have a func A=x^2 ,and a desired value of it as A_reference=100
by starting from x=0, i need to find the error rate between A_reference and A_calculated and if the error rate is not smaller than a certain value,
i need to update the x and feed it to the system again, then calculate the error rate until it meets the criterion.
How can I do it on Simulink? Can you guys show me an example of it?
There are documentation of while and for iterators but I couldn't find any helpful examples..
Thanks in advance!

답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by