Bruker DTI - create dti.txt in MATLAB

Start with the method file (see )

  1. Copy the directions

  2. Paste into Notepad and save as text file

    • Include extension, so “D.txt”

  3. In MATLAB, “Import Data” and select file

    • Check “Space” under Column delimiters

    • Change “Output Type” to “Numeric Matrix”

    • Import (by default all columns should be selected)

    • Variable will take name of file (e.g., “D”)

  4. In MATLAB Command Window, rearrange the imported variable into rows of x/y/z

% Transpose D = D'; % Get rid of NaN's at end D(isnan(D)) = []; % Reshape into x/y/z (columns) D = reshape(D,3,[]); % Flip so xyz are in rows D = D';

 

Copy directions

Paste into Notepad and save as text file *e.g., “D.txt”)

Import