hello
you have to make A and t the same size to make it work
so this is it :
f1 = 100000; %input signal 1 frequency
f2 = 200000; %input signal 2 frequency
fs = 50*f1; %sampling frequency
Ta = 1/f1; %input frequency period
Ts = 1/fs; %sampling frequency period
t = (0:Ts:50*Ta); %timing and step size
A = linspace(-pi,pi,length(t)); %Fixed amplitude value
G = 10; %Gain of amplifiers
S1 = cos(2*pi*f1*t + acos(A)); %Input signal 1
S2 = cos(2*pi*f2*t - acos(A)); %Input signal 2
Sout = G*(S1+S2); %Combined output signal
plot (Sout);
