Guest User

Untitled

a guest
Jan 15th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. Chan 1:
  2. -7.33475E-0001 1.03285E+0000 1.67651E+0000 5.98755E-0002 -8.23288E-0001 4.93973E-0001 1.36217E+0000 1.34720E-0001 -8.08319E-0001 4.64035E-0001
  3. 1.70645E+0000 5.98755E-0001 -8.53226E-0001 1.49689E-0002 1.60167E+0000 1.09273E+0000 -2.54471E-0001 4.19128E-0001 2.12558E+0000 1.73639E+0000
  4. -4.49066E-0002 -1.04782E-0001 1.45198E+0000 1.49689E+0000 -1.64658E-0001 -4.19128E-0001 1.16757E+0000 1.51186E+0000 -1.19751E-0001 -7.78381E-0001
  5. 7.33475E-0001 1.69148E+0000 3.44284E-0001 -7.33475E-0001 4.93973E-0001 1.57173E+0000 3.44284E-0001 -1.04782E+0000 -7.48444E-0002 1.51186E+0000
  6. 9.28070E-0001 -5.08942E-0001 4.49066E-0002 1.49689E+0000 1.03285E+0000 -5.38879E-0001 -2.09564E-0001 1.60167E+0000 1.63161E+0000 -1.64658E-0001n
  7. Chan 2:
  8. -5.53848E-0001 1.00291E+0000 1.37714E+0000 -2.69440E-0001 -8.38257E-0001 8.83163E-0001 1.85614E+0000 4.49066E-0001 -6.28693E-0001 6.43661E-0001
  9. 1.94595E+0000 8.83163E-0001 -4.64035E-0001 4.93973E-0001 1.90105E+0000 1.13763E+0000 -4.19128E-0001 7.48444E-0002 1.69148E+0000 1.30229E+0000
  10. -3.74222E-0001 -3.44284E-0001 1.22745E+0000 1.30229E+0000 -3.89191E-0001 -6.88568E-0001 1.07776E+0000 1.66154E+0000 1.34720E-0001 -6.28693E-0001
  11. 6.13724E-0001 1.25739E+0000 -4.49066E-0002 -8.08319E-0001 6.88568E-0001 1.93098E+0000 7.33475E-0001 -7.48444E-0001 8.98132E-0002 1.55676E+0000
  12. 8.38257E-0001 -6.73599E-0001 1.49689E-0001 1.90105E+0000 1.46695E+0000 -3.44284E-0001 -2.39502E-0001 1.34720E+0000 1.28732E+0000 -2.84409E-0001
  13. -4.04160E-0001 1.15260E+0000 1.42204E+0000 -2.39502E-0001 -8.38257E-0001 7.48444E-0001 1.69148E+0000 3.14346E-0001 -6.58630E-0001 6.13724E-0001
  14. 1.70645E+0000 5.23911E-0001 -7.18506E-0001 4.49066E-0001 1.97589E+0000
  15. 1.13763E+0000 -3.14346E-0001 3.44284E-0001 1.85614E+0000 1.21248E+0000n
  16. Chan 3:
  17. -6.28693E-0001 -4.34097E-0001 1.25739E+0000 1.25739E+0000 -4.19128E-0001 -6.88568E-0001 8.38257E-0001 1.15260E+0000 -4.19128E-0001 -9.58008E-0001
  18. 6.28693E-0001 1.55676E+0000 2.84409E-0001 -5.83786E-0001 7.48444E-0001 1.82620E+0000 6.28693E-0001 -5.53848E-0001 5.38879E-0001 1.91602E+0000
  19. 1.00291E+0000 -5.38879E-0001 0.00000E+0000 1.45198E+0000 8.23288E-0001 -8.53226E-0001 -5.98755E-0001 1.06279E+0000 1.06279E+0000 -4.79004E-0001n
  20.  
  21. fid = fopen('c:temptemp.txt');
  22. vars = {'X','Y','Z'};
  23. varIndex = 0;
  24. current = [];
  25. while 1
  26. tline = fgetl(fid);
  27. if ~ischar(tline), break, end
  28.  
  29. newVar = ~isempty(strfind(tline,'Chan'));
  30.  
  31. if newVar
  32. if varIndex > 0
  33. eval([ vars{varIndex} '=current;']);
  34. current = [];
  35. end
  36. varIndex = varIndex + 1;
  37. else
  38. newData = textscan(tline,'%f');
  39. current = [current newData{:}'];
  40. end
  41. disp(tline)
  42. end
  43.  
  44. eval([ vars{varIndex} '=current;']);
  45. current = [];
  46.  
  47. fclose(fid)
Add Comment
Please, Sign In to add comment