Advertisement
Guest User

Q3

a guest
May 24th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. function [linCoeffs] = getLinearTrend(y)
  2. if isrow(y) == 1
  3. t=1:1:length(y);
  4. else
  5. t=(1:1:length(y))';
  6. end
  7. linCoeffs = polyfit(t,y,1);
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement