visual3d:documentation:partners:matlab:matlab_read_v3d_text
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:partners:matlab:matlab_read_v3d_text [2024/06/17 18:18] – created sgranger | visual3d:documentation:partners:matlab:matlab_read_v3d_text [2024/07/12 13:28] (current) – removed sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | The following sample code can be used to read a [[Visual3D: | ||
- | |||
- | This assumes the user exported the headers. The numerical values are stored in numericData and the headers are stored in headerData. | ||
- | |||
- | ===== Exmaple ===== | ||
- | |||
- | < | ||
- | % --------------------------------------------------- | ||
- | % Read Visual3D Text File | ||
- | % --------------------------------------------------- | ||
- | |||
- | filename = ' | ||
- | |||
- | numericData = dlmread(filename,' | ||
- | |||
- | [ rows , columns ] = size(numericData); | ||
- | headerCount = ( columns + 1 )* 5; | ||
- | |||
- | fileID = fopen(filename); | ||
- | importHeaders = textscan(fileID,' | ||
- | fclose(fileID); | ||
- | |||
- | clearvars filename fileID; | ||
- | |||
- | headerData = cell(5, | ||
- | start=2; | ||
- | for i=1:5 | ||
- | stop= (start + columns) - 1; | ||
- | headerData(i,: | ||
- | start = stop+2; | ||
- | end | ||
- | |||
- | clearvars rows columns start stop i headerCount importHeaders; | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
visual3d/documentation/partners/matlab/matlab_read_v3d_text.1718648285.txt.gz · Last modified: 2024/06/17 18:18 by sgranger