Vidhan - what are the values for your predefined variables? If I randomly assign some numbers (to them) then I see two lines. Once the loop has finished, what does the data in the arrays m and q look like?
Note that each time that you call plot, the code is creating a graphics object on the parent figure. Since you are collecting all of your data into two arrays, then you may as well just plot the data once the arrays have been populated. For example,
m = zeros(40,2);
q = zeros(40,2);
n = 16.7185;
for k = 1:1:40
n = n+0.1;
T2 = T1*n^l;
T4 = T3/n^l;
efficiency = 1-1/n;
m(k,1) = n;
q(k,1) = n;
m(k,2)= W/(T3-T4-T2+T1)/Cp;
q(k,2) = W/efficiency;
end
figure;
hold on;
plot(m(:,1),m(:,2),'b.');
plot(q(:,1),q(:,2),'r.');
(Note that I replaced i with k since MATLAB uses i and j to represent the imaginary number. It is good practice to avoid using indexing variables with the same name.)