What’s wrong?

12 visualizaciones (últimos 30 días)
Aurelius Hardy
Aurelius Hardy el 12 de Feb. de 2021
Comentada: Rik el 12 de Feb. de 2021
what am i doing wrong? plot not showing up. the t&v is in parenthesis
  2 comentarios
Kevin Barkett
Kevin Barkett el 12 de Feb. de 2021
Hi there,
It looks like the parenthesis of the variable 't' should not encapsulate that first colon, and also the arguments for the plot command should be contained within parenthesis. Try:
t = 0:(1/6000):(1/30);
v = (4*cos((120*pi*t)+(pi/3)));
plot(t,v);
Cheers, Kevin
Aurelius Hardy
Aurelius Hardy el 12 de Feb. de 2021
thank you

Iniciar sesión para comentar.

Respuestas (1)

Blue
Blue el 12 de Feb. de 2021
Is this what you want ? Works fine.
t = 0:1/6000:1/30
v = (4*cos((120*pi*t) + (pi/3)))
plot(t,v)
  2 comentarios
Aurelius Hardy
Aurelius Hardy el 12 de Feb. de 2021
thanks somethings finally coming up but why is it looking like this
Rik
Rik el 12 de Feb. de 2021
The code in the answer should not result in an image like you posted. What exact code did you use?

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Performance 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