MATLAB: Plot scatter and line in same grid

MATLABplotting

I am given a table of values that I am supposed to find a linear equation for then I am supposed to plot them both together.
Basically a scatter plot with a line of best fit
But through using the hold on command my graph won’t plot them both it only comes up with the scatter.
Help!!
Heres my code down to the sweet point
——————————————————
h=[0 2000 5000 7500 10000 20000 26000];
t=[212 210 203 198 194 178 168];
x=[0:1:3]
y=-.0017*x+211.88
scatter(h,t)
hold on
plot(x,y)
hold off
——————————————————
its only plotting the scatter
help appreciated

Best Answer

x=[0:1:3]*10000 will solve your problem.