MATLAB: Solving linear equations simultaneoulsy.

linearloopMATLABsimultaneousvectorisation

I have a vector of m and a vector of c values for a set of linear expressions. I have a value for m and c for a single expression. What I want to do is solve the linear equation for all the m and c values. How would I simultaneously solve this expression with every one in the two corresponding vectors.
i.e.
y=2x +5
m=[3 4 5]
c=[2 3 6]
y=2x+5 with y=3x +2
y=2x+5 with y=4x+3
y=2x+5 with y=5x+6

Best Answer

x=(5-c)./(m-2);
y=2*x+5;