S11as

approximation

May 11th, 2020
298
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #введите свои х и у, я не разобрался где там что xD
  2. X = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  3. Y = X.*2+randn(size(X))
  4. coeff = polyfit(X, Y, 1)
  5.  
  6. XX = linspace(min(X),max(X));
  7. YY = coeff(1)*XX.+coeff(2)
  8.  
  9. plot(X,Y, 'ok', XX, YY)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×