how plot s(t)

where s(t)= cos(t/2)cos(w*t)-sin(t/2)sin(w*t) where 0 < t< pi w=1000

Risposte (2)

Stalin Samuel
Stalin Samuel il 3 Mar 2016

0 voti

% for example
t=0.1:0.1:pi
s= cos(t/2).*cos(w*t)-sin(t/2).*sin(w*t)
plot(s)

1 Commento

clowen
clowen il 3 Mar 2016
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

Accedi per commentare.

Star Strider
Star Strider il 3 Mar 2016

0 voti

You’re not calling the functions themselves in your ‘q’ assignment. Change it to:
q=@(t) s1(t)+s12(t);

Categorie

Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange

Tag

Richiesto:

il 3 Mar 2016

Risposto:

il 3 Mar 2016

Community Treasure Hunt

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

Start Hunting!

Translated by