Hello all, kindly, I have question , how can I get the piecewise function of this blood flow rate shown below using Matlab

조회 수: 1 (최근 30일)
Hello all, kindly, I have question , how can I get the piecewise function of this blood flow rate shown below using Matlab

채택된 답변

Torsten
Torsten 2024년 7월 20일
이동: Torsten 2024년 7월 20일
T = 0.56;
A = 220;
fun = @(x)A*sin(2*pi*x/T).*(x>=0 & x<=T/2) + 0*(x>T/2 & x <=0.7);
F = @(x)fun(mod(x,0.7));
x = linspace(0,3,1001);
plot(x,F(x))

추가 답변 (1개)

Sam Chak
Sam Chak 2024년 7월 20일
Constructing a piecewise function can be a tedious process, as this sinusoidal signal requires defining numerous intervals and corresponding function segments. However, there is a mathematical technique that can be employed to simplify the representation of a clipped sinusoidal signal without the need for a piecewise approach.
This method, which is commonly taught in mathematics courses but may not be as extensively covered in many engineering curricula (with the exception of certain electrical engineering topics, such as the analysis of half-wave rectifier diode circuits), allows for "clipping" the bottom portion of the sinusoidal waveform.
t = linspace(0, 3, 3001);
A = 200; % amplitude
T = 0.7; % period
y = max(0, A*sin(2*pi/0.7*t));
plot(t, y), grid on, ylim([-50 250])
  댓글 수: 1
FAWAZ FAREAD AL BAKRI
FAWAZ FAREAD AL BAKRI 2024년 7월 20일
Hello Sam,
thank you for help,
The period should be differnt: the period for sin wave is (0.28 s) while the period for getting zero is (0.42)

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

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by