Hi Bahaa,
From my understanding this error has originated as you are trying to multiply the output of the mux which is a signal of dimension [1x2] with F having the dimension [5x1]. As a general rule for matrix multiplication the number of columns of the first matrix must be equal to the rows of the second. So, in this case, you could modify the number of outputs to be 5 for the mux or the number of rows of F to be 2 to satisfy this condition. Hope this resolves your issue.