there is no plotting appearance
Mostrar comentarios más antiguos
u=32620
l=1*10^-6
a=u/l
t=1*10^-6:100:1*10^-4
b=a.*t
y=b*exp(-t/10^-6)
plot(t,y)
1 comentario
VBBV
el 25 de Mayo de 2024
As @Stephen23 mentioned , use of linspace or logspace is more appropriate to plot graphs
t = linspace(1e-6,1e-4,100) y = b.*exp(-t/10^-6) %use element wise multiplication also.
Use also element wise multiplication operation.
Respuestas (1)
"there is no plotting appearance"
Because you are plotting exactly one data point. By default there PLOT shows lines (which connect data points) and no data point markers. Because you have exactly one data point there is therefore no line and no marker.
If you want to make one data point visible then define a marker:
u = 32620;
l = 1*10^-6;
a = u/l;
t = 1*10^-6:100:1*10^-4
b = a.*t;
y = b*exp(-t/10^-6)
plot(t,y,'*')
1 comentario
Perhaps you incorrectly expect this line:
t = 1*10^-6:100:1*10^-4
to produce a vector of values. You attempted to go from 1e-6 to 1e-4 in steps with size 100. How many steps of size 100 can you fit between 1e-6 and 1e-4 ? None, so only the first data point is returned.
You were probably attempting something like this:
t = linspace(1e-6,1e-4,100)
or, given the range of values, perhaps this:
t = logspace(-6,-4,100)
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

