Plotting heaviside (unit step) for circuits analysis not working (says "busy")?
Show older comments
Hi guys, I 'm trying to plot a simple heaviside function (unit step) for my summer circuits analysis course. When I click "RUN" on Matlab, it says BUSY on the bottom-left corner and just freezes. I have MATLAB R2017B installed with the symbolic math toolbox and I even just reinstalled it 2 minutes ago just to get a clean install.
This is my code:
clc
clear
t = -4:0.01:4;
f = 3 + (-2 - 3)*heaviside(t) + ((2*t-4) + 2).*heaviside(t-2);
plot(t,f);
xlabel('Time (s)')
ylabel('f(t)')
title('Plot of f(t) vs. t')
ylim([-3 4])
Answers (0)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!