Advertisement
Guest User

Price vs sq in for one board (ignoring extra boards)

a guest
Nov 23rd, 2012
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.82 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 * x;
  9. CIR = 0.87427 * x + 6.50;
  10. ITE = (9.90) * (heaviside(x) - heaviside(x - 3.875)) + ...
  11.     (22.00) * (heaviside(x - 3.875) - heaviside(x - 7.750)) + ...
  12.     (24.90) * (heaviside(x - 7.750) - heaviside(x - 15.5)) + ...
  13.     (38.00) * 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 for one board (ignoring extra boards)')
  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(1.57, 5.37, '\uparrow (1.57 sq in, $7.87)', 'HorizontalAlignment', 'left')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement