Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GapSpectral
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
GapSpectral
Commits
c2262979
Commit
c2262979
authored
Aug 16, 2019
by
Andrew Cohen
Browse files
Options
Downloads
Patches
Plain Diff
new string format in press.m 'v1' ; 'v2'
parent
8697f4c5
No related branches found
No related tags found
No related merge requests found
Pipeline
#301
failed
Aug 16, 2019
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Press.m
+19
-2
19 additions, 2 deletions
Press.m
with
19 additions
and
2 deletions
Press.m
+
19
−
2
View file @
c2262979
...
@@ -59,6 +59,8 @@ function nBytes = Press(V1,V2)
...
@@ -59,6 +59,8 @@ function nBytes = Press(V1,V2)
persistent
lib
persistent
lib
if
~
libisloaded
(
'lib'
)
if
~
libisloaded
(
'lib'
)
warning
(
'off'
,
'MATLAB:loadlibrary:StructTypeExists'
);
warning
(
'off'
,
'MATLAB:loadlibrary:parsewarnings'
);
loadlibrary
bz2dll
.
dll
bzlib
.
h
alias
lib
loadlibrary
bz2dll
.
dll
bzlib
.
h
alias
lib
end
end
...
@@ -69,7 +71,8 @@ end
...
@@ -69,7 +71,8 @@ end
if
iscell
(
V2
)
if
iscell
(
V2
)
V2
=
cell2mat
(
V2
);
V2
=
cell2mat
(
V2
);
end
end
vv
=
mat2str
([
V1
;
V2
]);
vv
=
combineString
(
V1
,
V2
);
sz
=
length
(
vv
(:));
sz
=
length
(
vv
(:));
dsz
=
sz
+
1024
;
dsz
=
sz
+
1024
;
...
@@ -85,6 +88,20 @@ if rval
...
@@ -85,6 +88,20 @@ if rval
end
end
nBytes
=
double
(
get
(
pdsz
,
'Value'
));
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment