I want to make a scatter plot of two matrices, including a trend line. My two matrices are: growth and trade. Both are of the size NxT, where N is the number of countries and T the number of observations (per country). I want to see whether growth and trade have a relationship for the entire sample (for all countries). So far, my code looks as follows:
figure
for j=1:N
scatter(growth(:,j),trade(:,j))
xlabel('growth')
ylabel('trade')
hold on
lsline
end
hold off
The scatter plot looks fine but when I want to include a fitted line in order to see whether there exists a relationship between the two matrices I obtain a fitted line for each individual country. How can I get a fitted line between the two entire matrices in my scatter plot? In other words, I would like my scatter plot to include a fitted line for all countries, not for each individual countries. Thanks in advance.

polyfitn- Hoki