![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177173/image.jpeg)
Input Code for programmable voltage supply simulink
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey everyone, I am working on a project on simulink where i have to build a RC circuit. Anyway the voltage source for this has to be 'sin wave for first 0.6 seconds and 0 for the rest of 0.4 seconds. Obviously this requires matlab coding with a script, like an if statement etc.. So how do i go about doing this for a voltage source of an RC circuit in simulink.
Thanks
댓글 수: 0
답변 (2개)
Orion
2014년 12월 17일
Hi,
you could also just do it in Simulink:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177173/image.jpeg)
댓글 수: 2
Orion
2014년 12월 17일
I'm guessing you're using a simscape block ?
I don't have this toolbox anymore, but if I recall fine, you need to use the PS-Simulink Converter block to pass the data into first branch of the switch and then get the output and use the Simulink-PS COnverter to reconvert the signal in order to use tit in your circuit.
참고 항목
카테고리
Help Center 및 File Exchange에서 Electrical Block Libraries에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!