NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/strfun/str2vec.m

Revision 495 (checked in by cbc, 11 years ago)

Initial import of Stark code.

Line 
1 function vec = str2vec(inputstr)
2 % vec = str2vec(inputstr)
3 %
4 % changes a 2d array of strings (vector array of strings) to
5 % 1d row-wise vector of floating point values.
6 %
7 %
8 % Calls: none
9
10 % verify vector is 1d and not a matrix
11 M = size(inputstr, 1);
12 N = size(inputstr, 2);
13
14
15 for i=1:M
16   vec = [vec; str2num(deblank(inputstr(i,:)))];
17 end
18
19 % remove first value, since it is null
20 % vec(1)=[];
Note: See TracBrowser for help on using the browser.