Plotting heaviside (unit step) for circuits analysis not working (says "busy")?

1 view (last 30 days)
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])
  1 Comment
Al Pizano
Al Pizano on 3 Jul 2018
Well I got it to work by updating MATLAB, however, does anyone know how to use the dirac delta to plot it? I have a unit step equation with a dirac delta of -2dirac(t-18) with t = -9:0.01:18; and I can't for the life of me get the dirac delta to plot!!!!

Sign in to comment.

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!