>> tmp01 Error using * Inner matrix dimensions must agree.
Error in tmp01 (line 17) A4 = cos(n*2*pi*Fm*t-2*pi*Fc*t);
>>
Is this what you mean?
Posting the error will help people see where you are & give you an answer that is useful to you. . The error appears because n is a row vector ([50,1]) & t is a column ([100000,1]) You tell Matlab to do the multiply n*...*t & the inner dimensions don't match. (Which they shouldn't)
Did you intend to an outer product? to create a resulting matrix ([50,100000])? or perhaps its transpose?
If so, transposing each of them might help, or swapping the order of the multiplications?