필터 지우기
필터 지우기

Can I send two individual signals one after the other in matlab/simulink

조회 수: 4 (최근 30일)
I have to create a input sin wave with 10Vp-p 50Hz and 5Vp-p 50Hz on the same waveform. I don't know how to create a signal with two different amplitudes.
My idea is to consider them as two separate signals and then send them continuously one after other. Looking like a small sine wave following large sine wave of same frequency. is there any method to combine two separate input signal or any method to implement this in Simulink(preferred) or mat lab. Any help is appreciated.

채택된 답변

Star Strider
Star Strider 2018년 10월 1일
One approach:
t = linspace(0, 1, 500);
s = [10*sin(2*pi*50*t(1:fix(numel(t)/2))/max(t)), 5*sin(2*pi*50*t(fix(numel(t)/2)+1:end)/max(t))];
figure
plot(t, s)
grid
Experiment to get the result you want.
  댓글 수: 2
byb
byb 2018년 10월 3일
Hi, thanks for the reply. this works as I needed, can I ask you how can I send this code to Simulink as my project is being done using Simulink as input signal.
Is there any block already available in Simulink??
Star Strider
Star Strider 2018년 10월 3일
My pleasure.
I am not sufficiently familiar with Simulink to do that. I will experiment later. I cannot promise a Simulink solution.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by