How do i plot this rect function and unit step function into matlab?

回答 (2 件)

madhan ravi
madhan ravi 2018 年 11 月 2 日

0 投票

See rectangularpulse and piecewise are sufficient enough to finish your homework.
Remark: use symbolic variables using symbolic toolbox

1 件のコメント

madhan ravi
madhan ravi 2018 年 11 月 2 日
If you still don’t figure it out , post the code which you tried here so that it can be corrected .

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

Tilkesh
Tilkesh 2022 年 3 月 28 日

0 投票

function y = rect(x, D)
% function y = rect(x, D)
if nargin == 1, D = 1;
x = abs(x);
y = double(x<D/2);
y(x == D/2) = 0.5;
end

カテゴリ

ヘルプ センター および File ExchangeLabels and Styling についてさらに検索

タグ

質問済み:

2018 年 11 月 2 日

回答済み:

2022 年 3 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by