` if i have a signal y = Acos(wt) and now i want to vary my amplituded and angular frequency. like that- ∑A(i)cos(w(i)t) where i varies from any 1 to 100.I write the code like thist = 0:0.01:1;A(1:length(t)) = 0;w(1:length(t)) = 0;`

for i = 1:length(t) y= A*cos(w*t) end But i get an error… please help

## Best Answer