• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# This overlays droplets ontop of eachother

a guest Sep 17th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. A = RA0132a0g2
2.
3. %Locate droplets
4. drop1 = A([668:4156],[1 2])
5. drop2 = A([6205:9693],[1 2])
6. drop3 = A([12861:16349],[1 2])
7. drop4 = A([18679:22167],[1 2])
8. drop5 = A([24500:27988],[1 2])
9.
10. %Convert Tables to Matrices
11. drop1 = drop1{:,:}
12. drop2 = drop2{:,:}
13. drop3 = drop3{:,:}
14. drop4 = drop4{:,:}
15. drop5 = drop5{:,:}
16.
17. drop1mod = drop1;
18. drop2mod = drop2;
19. drop3mod = drop3;
20. drop4mod = drop4;
21. drop5mod = drop5;
22.
23. %Average droplet elements to create single average matrix
24. meanMatrix  = (drop1mod + drop2 + drop3 + drop4 + drop5)/15;
25. meanMatrix2 = meanMatrix
26.
27. i = 3489;
28. j = 0;
29.
30. for r = 1:i
31.         meanMatrix2(r,1) = j;
32.         %Overlap all droplets
33.         drop1mod(r,1) = j;
34.         drop2mod(r,1) = j;
35.         drop3mod(r,1) = j;
36.         drop4mod(r,1) = j;
37.         drop5mod(r,1) = j;
38.         j = j + 0.00005;
39. end
40.
41. figure;
42. x = meanMatrix2(:,1);
43. y = meanMatrix2(:,2);
44. p = plot(x,y, 'r')
45. p.LineWidth = 3;
46.
47. hold on
48.
49. y2 = drop1mod(:,2);
50. plot(x,y2)
51.
52. y3 = drop2mod(:,2);
53. plot(x,y3)
54.
55. y4 = drop3mod(:,2);
56. plot(x,y4)
57.
58. y5 = drop4mod(:,2);
59. plot(x,y5)
60.
61. hold off
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top