Size=input ('Give the number of elements in matrix to be given n= ') Q = input(' Give me the elements you want to calculate in a Zx field ') X = input(' Give me the x= ') A = input('Give me a= ') B= input('Give me b= ') for i=1:Size q(i)=mod((A.*Q(i)+B),X); end q