i had problem to do the coding in matlab

Status
Not open for further replies.

dmss

Newbie level 3
Joined
Apr 17, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
how to make a coding for discrete-time periodic signal

s = cos ωn
ω = 2π/5

i had try this coding but was error

n = 0:10
ω = 2*pi/5
s = cos (ω*n);
plot (n,s) grid on;
 

how about

to create a coding for

s = A^|n|, |A|<1
 

how to declare
the funtion of "|A|<1"
when i use
0<A<1
it was error
 

>> A=0.3;
>> n=0:10;
>> s = A.^abs

s =

Columns 1 through 8

1.0000 0.3000 0.0900 0.0270 0.0081 0.0024 0.0007 0.0002

Columns 9 through 11

0.0001 0.0000 0.0000

>>
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…