visual3d:documentation:third-party: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:third-party:matlab:matlab_read_v3d_text [2024/07/16 17:02] – removed sgranger | visual3d:documentation:third-party:matlab:matlab_read_v3d_text [2024/07/17 15:46] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Matlab Read V3D Text ====== | ||
+ | |||
+ | 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/third-party/matlab/matlab_read_v3d_text.1721149355.txt.gz · Last modified: 2024/07/16 17:02 by sgranger