MATLAB Answers


timeseries superposition given matrix and weights

Asked by Nicole
on 18 Apr 2013

I have a design matrix as follows: G(:,1)=ones(N,1); G(:,2)=linspace(-1,1,N); G(:,3)=sin(linspace(-10*pi,10*pi,N)); I set N =1000 and I want to know how do I to generate a time series that is a linear superposition of G with weights, say .1, .3, .6. ?



No products are associated with this question.

1 Answer

Answer by per isakson
on 18 Apr 2013
Edited by per isakson
on 18 Apr 2013

Did you try

    S = 0.1*G(:,1) + 0.3*G(:,2) + 0.6*G(:,3);



Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!