필터 지우기
필터 지우기

how plot s(t)

조회 수: 1 (최근 30일)
clowen
clowen 2016년 3월 3일
답변: Star Strider 2016년 3월 3일
where s(t)= cos(t/2)cos(w*t)-sin(t/2)sin(w*t) where 0 < t< pi w=1000

답변 (2개)

Stalin Samuel
Stalin Samuel 2016년 3월 3일
% for example
t=0.1:0.1:pi
s= cos(t/2).*cos(w*t)-sin(t/2).*sin(w*t)
plot(s)
  댓글 수: 1
clowen
clowen 2016년 3월 3일
w=2*pi*1.0E+5; s1=@(t) cos(t/2).*cos(w*t) .*((0 t) & (t <= pi)); > s12=@(t) sin(t/2).*cos(w*t) .*((0 t) & (t<= pi)); > q=@(t) s1+s12; linspace(0,pi); plot(t,q(t)); whats wrong with the above program

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


Star Strider
Star Strider 2016년 3월 3일
You’re not calling the functions themselves in your ‘q’ assignment. Change it to:
q=@(t) s1(t)+s12(t);

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by