Borrar filtros
Borrar filtros

Plotting a function error

1 visualización (últimos 30 días)
Krish Desai
Krish Desai el 14 de Mzo. de 2016
Respondida: Image Analyst el 14 de Mzo. de 2016
I'm trying to plot the following: y=((e^(-6t))/6)*(1-9e^(6t)+14e^(6t)
t=-10:1:10;
plot (t,((exp(-6*t))/6)*(1-9*exp(4*t)+14*exp(6*t)))
but the error message "inner matrix dimensions must agree" pops up. What a I doing wrong?

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Mzo. de 2016
Whever you see that, try using dots before the mathematical operators. In other words, use .* instead of *
t=-10:1:10;
y = (exp(-6*t) / 6) .* (1-9*exp(4*t)+14*exp(6*t))
plot(t, y, 'b*-')

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by