# Multiplication of two variables that has different lengths; (MATLAB coding) [closed]

I have a big problem to solve fast but I couldn't find anything about how to do that. I have a vector of amplitudes $1 \times n$, they are simple integers. I want to multiply these amplitudes individually by $\cos(2 \pi f t)$, where the time $t$ is defined as the vector t=0:1/(10*f):1/f in Matlab. I couldn't find any solutions and I need help. Any help will be appreciated, thanks.

Your time $t$ is a vector with multiple values and $\cos(2\pi ft)$ is a function of $t$ which means that $\cos(2 \pi ft)$ will also be a vector that changes with your $t$. To multiply your signal with your amplitude vector the vectors must have the same dimensions. For example:
f = 50; %frequency