フィルターのクリア

How to programe clipping sine wave

22 ビュー (過去 30 日間)
Mvana
Mvana 2022 年 8 月 2 日
回答済み: Munyaradzi 2024 年 4 月 28 日
TIME =linspace(0,6*pi,200)
SignalVoltage = 7*sin(Time)

採用された回答

Sam Chak
Sam Chak 2022 年 8 月 2 日
編集済み: Sam Chak 2022 年 8 月 2 日
Cannot open your jpg (I'm lazy to fix the link). If you study Pure Math in high school, you need to use the sign function to clip the signal. But in MATLAB, it's a pretty easy job do something like this. In Electrical Engineering, you can use the Diode Clipper circuit.
% original sine wave
t = linspace(0, 6*pi, 3600*3+1);
x = 7*sin(t);
plot(t, x, 'linewidth', 1.5), hold on
% clipped sine wave
ub = 4; % upper bound
lb = -4; % lower bound
y = max(lb, min(x, ub));
plot(t, y, 'linewidth', 1.5), hold off
grid on, xlabel('t'), ylabel('x(t)'), ylim([-10 10])
  2 件のコメント
Thando
Thando 2022 年 9 月 5 日
@Sam Chak, i followed the instruction the exact same way as you instructed @Mvana but im only getting 1/3, is there another way to get all 3 correct
Sam Chak
Sam Chak 2022 年 9 月 5 日
@Thando, Not exactly sure what you meant by getting 1/3 and all correct. Please enlighten.

サインインしてコメントする。

その他の回答 (2 件)

Mbongeni
Mbongeni 2022 年 8 月 8 日
how do i use the end function? i have a row by column vector and matlab instructions say that i must use the end command,but it gives me an error when i try it. What can i do to solve this problem?
  1 件のコメント
Sam Chak
Sam Chak 2022 年 8 月 8 日
@Mbongeni, Please post a new question and the error
function Mbongeni
% type your code here.
end

サインインしてコメントする。


Munyaradzi
Munyaradzi 2024 年 4 月 28 日
Time= linspace(0,6*pi,200)
y= 7*sin(Time)
y(y<-5) = -5
y(y>5) = 5
signalVoltage=y

カテゴリ

Help Center および File ExchangePulse and Transition Metrics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by