- #1
fiendslyr
- 1
- 0
So this problem involves computing and plotting the FFT in MATLAB. However, I do not know how to define a piecewise function in MATLAB. The function is as follows:
How do I go about defining that function in MATLAB? I know how to do the plotting but just never dealt with piecewise functions in this program. Thanks.
Code:
y_of_t = { 10cos(2*pi*2500*t), 0 <= t <= 1 msec
0 , else
How do I go about defining that function in MATLAB? I know how to do the plotting but just never dealt with piecewise functions in this program. Thanks.