The question is not clear. What I understood is, you want the same number of elements in different interval range.
You can use 'linspace(x1,x2,n)' function for generate linearly spaced vector.
clc,clear
T0=46500;
a=994.71;
T_SSL=518.69;
rho_SSL=0.002377;
m=0.6;
g=32.2;
R=1716;
aL=-0.003563;
x = g./(a.*R);
h0=0.0;
%Z=h0:5000:45000; W=50:10:950;
Z = linspace(h0,45000,50);
W = linspace(50,950,50);
for i = 1:numel(Z)
h(i) = Z(i);
v(i) = W(i);
T(i) = T_SSL+aL*h(i);
rho(i) = rho_SSL*((T(i)/T_SSL)^-(x+1));
TH2(i)=T0*(rho(i)/rho_SSL)^m;
M(i) = v(i)/a;
end
plot(M,TH2);
xlabel('Mach Number');
ylabel('Thrust Available (lb)');
title('Thrust Available vs Mach Number');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/179211/image.png)