Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  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, reword the imported variable into rows of x/y/z

Code Block
languagematlab
% 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

Image Added

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

Image Added

Import

Image AddedImage AddedImage Added