What’s wrong?

조회 수: 3 (최근 30일)
Aurelius Hardy
Aurelius Hardy 2021년 2월 12일
댓글: Rik 2021년 2월 12일
what am i doing wrong? plot not showing up. the t&v is in parenthesis
  댓글 수: 2
Kevin Barkett
Kevin Barkett 2021년 2월 12일
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 2021년 2월 12일
thank you

댓글을 달려면 로그인하십시오.

답변 (1개)

Blue
Blue 2021년 2월 12일
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
Aurelius Hardy
Aurelius Hardy 2021년 2월 12일
thanks somethings finally coming up but why is it looking like this
Rik
Rik 2021년 2월 12일
The code in the answer should not result in an image like you posted. What exact code did you use?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by