Revision 495
(checked in by cbc, 12 years ago)
|
Initial import of Stark code.
|
Line | |
---|
1 |
function longstr = vec2str(inputarr) |
---|
2 |
% longstr = vec2str(inputarr) |
---|
3 |
% |
---|
4 |
% changes a 1d floating point vector into a vector array of strings |
---|
5 |
% useful for putting into editable uicontrol |
---|
6 |
% |
---|
7 |
% |
---|
8 |
% Calls: none |
---|
9 |
|
---|
10 |
% verify vector is 1d and not a matrix |
---|
11 |
M = size(inputarr, 1); |
---|
12 |
N = size(inputarr, 2); |
---|
13 |
|
---|
14 |
if (M ~= 1 & N ~= 1) |
---|
15 |
disp('input array must be a 1 dimensional array'); |
---|
16 |
return |
---|
17 |
end |
---|
18 |
|
---|
19 |
for i=1:length(inputarr) |
---|
20 |
lilstr = deblank(mat2str(inputarr(i))); |
---|
21 |
longstr = str2mat(longstr, lilstr); |
---|
22 |
end |
---|
23 |
|
---|
24 |
% remove first string, since it is blank |
---|
25 |
longstr(1,:)=[]; |
---|