Commit c2262979 authored by Andrew Cohen's avatar Andrew Cohen
Browse files

new string format in press.m 'v1' ; 'v2'

parent 8697f4c5
Pipeline #301 failed with stages
......@@ -59,6 +59,8 @@ function nBytes = Press(V1,V2)
persistent lib
if ~libisloaded('lib')
warning('off','MATLAB:loadlibrary:StructTypeExists');
warning('off','MATLAB:loadlibrary:parsewarnings');
loadlibrary bz2dll.dll bzlib.h alias lib
end
......@@ -69,7 +71,8 @@ end
if iscell(V2)
V2=cell2mat(V2);
end
vv= mat2str([V1;V2]);
vv=combineString(V1,V2);
sz=length(vv(:));
dsz=sz+1024;
......@@ -85,6 +88,20 @@ if rval
end
nBytes=double(get(pdsz, 'Value'));
end
function vv=combineString(V1,V2)
s1=prepareString(V1);
s2=prepareString(V2);
vv=[s1 ';' s2];
function s=prepareString(v)
if isempty(v)
s='';
return
end
s=mat2str(v);
if length(v)>1
s=s(2:end-1);
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment