Simulink function block to multiply a signal with -1 if its negative

Hi
Is it possible that I can use a block in Simulink to set conditions that if this signal which is going to be a numerical is less than 0 than simulation multiplies it by -1 to convert it to positive?
Or have two function blocks one for a positive number and one negative and depending on the number simulation takes two different paths?
Thanks for the help

 채택된 답변

Chandrasekhar
Chandrasekhar 2014년 4월 4일

0 개 추천

find the attached logic

댓글 수: 2

Or else u can use an abs block of Math operations. simple...

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

2014년 4월 4일

댓글:

2014년 4월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by