Filter löschen
Filter löschen

Graph window is blank

1 Ansicht (letzte 30 Tage)
Sreenidhi Yeturi
Sreenidhi Yeturi am 24 Feb. 2021
Beantwortet: Rik am 24 Feb. 2021
function V_Gauss_Pulse(t, to, t_w)
tp = (t-to)^2/t_w^2;
vg = exp(tp);
plot (vg,t)

Antworten (1)

Rik
Rik am 24 Feb. 2021
As most of the operation you perform don't work for most shapes of input data, I'm assuming you're calling this code with scalars.
What happens when you plot a line with a single point? You don't get a line. If you want to see a point, you need to change the default.
function V_Gauss_Pulse(t, to, t_w)
tp = (t-to).^2./t_w.^2;
vg = exp(tp);
plot(vg,t,'*')
end

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by