Advertisement
Guest User

Price vs sq in with extra boards accounted for

a guest
Nov 23rd, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.92 KB | None | 0 0
  1. clear all
  2. close all
  3. clc
  4.  
  5. x = 0:.01:16;
  6.  
  7. % Pricing formulas for OSH Park, Circuits.io and iTead Studio
  8. OSH = 5.00000 / 3 * x;
  9. CIR = 0.87427 / 3 * x + 6.50;
  10. ITE = (9.90 / 10) * (heaviside(x) - heaviside(x - 3.875)) + ...
  11.     (22.00 / 10) * (heaviside(x - 3.875) - heaviside(x - 7.750)) + ...
  12.     (24.90 / 10) * (heaviside(x - 7.750) - heaviside(x - 15.5)) + ...
  13.     (38.00 / 5) * heaviside(x - 15.5);
  14. UPV = 19.00 + (1 * x * (2 - 1));
  15.  
  16. hold on
  17. plot(x, OSH, 'red');
  18. plot(x, CIR, 'blue');
  19. plot(x, ITE, 'green');
  20. plot(x, UPV, 'Color', [1 0 1]);
  21. title('Price vs sq in with extra boards accounted for')
  22. xlabel('Area in sq in')
  23. ylabel('Cost in USD')
  24. legend('OSH Park', 'Circuits.io', 'iTead', 'Upverter', 'Location', 'NorthWest')
  25. grid on
  26.  
  27. % Intersection points
  28. text(4.66, 6.37, '\uparrow (4.76 sq in, $7.87)', 'HorizontalAlignment', 'left')
  29. text(0.39, 3, '\downarrow (0.59 sq in, $0.99)', 'HorizontalAlignment', 'left')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement