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

4 visualizaciones (últimos 30 días)
John Marl
John Marl el 2 de Nov. de 2018
Respondida: Tilkesh el 28 de Mzo. de 2022

Respuestas (2)

madhan ravi
madhan ravi el 2 de Nov. de 2018
See rectangularpulse and piecewise are sufficient enough to finish your homework.
Remark: use symbolic variables using symbolic toolbox
  1 comentario
madhan ravi
madhan ravi el 2 de Nov. de 2018
If you still don’t figure it out , post the code which you tried here so that it can be corrected .

Iniciar sesión para comentar.


Tilkesh
Tilkesh el 28 de Mzo. de 2022
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

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by