why there is only one value at my plot

3 visualizaciones (últimos 30 días)
Hakan Güngör
Hakan Güngör el 9 de Jun. de 2020
Comentada: darova el 12 de Jun. de 2020
syms t
t = 0:0.1:15;
a = ((30-30.*exp(-2.*t)).*(30.*t+15.*exp(-2.*t)+35))/(sqrt(490000-(30.*t+15.*exp(-2.*t)+35).^2));
plot(t,a)
here is my code. it just calculate a for t=15 and just show it on plot. i am new in matlab. could you help me?

Respuestas (1)

Tommy
Tommy el 9 de Jun. de 2020
Without the below period, MATLAB is performing right matrix division on two 1x151 vectors, resulting in a scalar value.
t = 0:0.1:15;
a = ((30-30.*exp(-2.*t)).*(30.*t+15.*exp(-2.*t)+35))./(sqrt(490000-(30.*t+15.*exp(-2.*t)+35).^2));
% ^ period added here
plot(t,a)
  2 comentarios
Hakan Güngör
Hakan Güngör el 9 de Jun. de 2020
Thank you so much!!! it works now :3
darova
darova el 12 de Jun. de 2020

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by