MATLAB Answers

how to plot this:

1 view (last 30 days)
HADIMARGO on 12 Jun 2019
Commented: Walter Roberson on 12 Jun 2019
hi. this is my code:
close all
clear all
syms t;
f=1*(t>=-1 & t<=1);
FT= int(f*exp(-i*w*t),-inf,inf);
ezplot (FT);
this is result:

  1 Comment

Walter Roberson
Walter Roberson on 12 Jun 2019
Do not try to use logical masking with symbolic expressions. t>=-1 evaluates (at best) to TRUE or FALSE, not to 0 or 1. Use piecewise() instead.
By the way, the integral is 0.

Sign in to comment.

Answers (0)

Sign in to answer this question.