Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
7eafb192
Commit
7eafb192
authored
Feb 02, 2017
by
Marco Berzborn
Committed by
Marco Berzborn
Feb 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for R2017a and some rework in itaSuper
parent
032d054b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
kernel/ClassStuff/@itaSuper/itaSuper.m
kernel/ClassStuff/@itaSuper/itaSuper.m
+15
-14
No files found.
kernel/ClassStuff/@itaSuper/itaSuper.m
View file @
7eafb192
...
@@ -142,7 +142,7 @@ classdef itaSuper < itaMeta
...
@@ -142,7 +142,7 @@ classdef itaSuper < itaMeta
fieldName
=
fieldnames
(
varargin
{
1
});
fieldName
=
fieldnames
(
varargin
{
1
});
end
end
end
end
for
ind
=
1
:
numel
(
fieldName
)
;
for
ind
=
1
:
numel
(
fieldName
)
try
try
this
.
(
fieldName
{
ind
})
=
varargin
{
1
}
.
(
fieldName
{
ind
});
this
.
(
fieldName
{
ind
})
=
varargin
{
1
}
.
(
fieldName
{
ind
});
catch
errmsg
catch
errmsg
...
@@ -166,8 +166,7 @@ classdef itaSuper < itaMeta
...
@@ -166,8 +166,7 @@ classdef itaSuper < itaMeta
end
end
function
this
=
set
.
time
(
this
,
value
)
function
this
=
set
.
time
(
this
,
value
)
dimensionsValue
=
size
(
value
);
dimensionsValue
=
size
(
value
);
nSamples
=
dimensionsValue
(
1
);
this
.
timeData
=
reshape
(
value
,
dimensionsValue
(
1
),
[]);
this
.
timeData
=
reshape
(
value
,
nSamples
,
[]);
this
.
dimensions
=
dimensionsValue
(
2
:
end
);
this
.
dimensions
=
dimensionsValue
(
2
:
end
);
end
end
function
result
=
get
.
freq
(
this
)
function
result
=
get
.
freq
(
this
)
...
@@ -176,8 +175,7 @@ classdef itaSuper < itaMeta
...
@@ -176,8 +175,7 @@ classdef itaSuper < itaMeta
end
end
function
this
=
set
.
freq
(
this
,
value
)
function
this
=
set
.
freq
(
this
,
value
)
dimensionsValue
=
size
(
value
);
dimensionsValue
=
size
(
value
);
nBins
=
dimensionsValue
(
1
);
this
.
freqData
=
reshape
(
value
,
dimensionsValue
(
1
),
[]);
this
.
freqData
=
reshape
(
value
,
nBins
,
[]);
this
.
dimensions
=
dimensionsValue
(
2
:
end
);
this
.
dimensions
=
dimensionsValue
(
2
:
end
);
end
end
...
@@ -467,7 +465,7 @@ classdef itaSuper < itaMeta
...
@@ -467,7 +465,7 @@ classdef itaSuper < itaMeta
else
else
this
.
mDataTypeEqual
=
false
;
this
.
mDataTypeEqual
=
false
;
end
end
if
str
match
(
'int'
,
value
)
if
str
cmp
(
'int'
,
value
)
ita_verbose_info
(
'Sorry, but
''
int
''
is really dangerous for dataTypeOutput, please use double or single.'
,
1
)
ita_verbose_info
(
'Sorry, but
''
int
''
is really dangerous for dataTypeOutput, please use double or single.'
,
1
)
end
end
end
end
...
@@ -599,7 +597,7 @@ classdef itaSuper < itaMeta
...
@@ -599,7 +597,7 @@ classdef itaSuper < itaMeta
% and select the appropriate Channel struct(s)
% and select the appropriate Channel struct(s)
%% merge channelInfo
%% merge channelInfo
channelFields
=
this
.
fields
;
channelFields
=
this
.
fields
;
channelFields
=
channelFields
(
str
match
(
'channel'
,
channelFields
));
channelFields
=
channelFields
(
str
cmp
(
'channel'
,
channelFields
));
for
idchfield
=
1
:
numel
(
channelFields
)
for
idchfield
=
1
:
numel
(
channelFields
)
thisFieldName
=
channelFields
{
idchfield
};
thisFieldName
=
channelFields
{
idchfield
};
...
@@ -663,7 +661,7 @@ classdef itaSuper < itaMeta
...
@@ -663,7 +661,7 @@ classdef itaSuper < itaMeta
%% merge channelInfo
%% merge channelInfo
channelFields
=
this
.
fields
;
channelFields
=
this
.
fields
;
channelFields
=
channelFields
(
str
match
(
'channel'
,
channelFields
));
channelFields
=
channelFields
(
str
cmp
(
'channel'
,
channelFields
));
for
idchfield
=
1
:
numel
(
channelFields
)
for
idchfield
=
1
:
numel
(
channelFields
)
thisFieldName
=
channelFields
{
idchfield
};
thisFieldName
=
channelFields
{
idchfield
};
...
@@ -758,7 +756,7 @@ classdef itaSuper < itaMeta
...
@@ -758,7 +756,7 @@ classdef itaSuper < itaMeta
[
sArgs
]
=
ita_parse_arguments
(
struct
(
'log_prefix'
,[]),
varargin
);
[
sArgs
]
=
ita_parse_arguments
(
struct
(
'log_prefix'
,[]),
varargin
);
%get logarithmic frequency data 20*log10(abs(Obj.freq)/referenceValue)
%get logarithmic frequency data 20*log10(abs(Obj.freq)/referenceValue)
[
x
,
refValues
,
log_prefix
]
=
itaValue
.
log_reference
(
this
.
channelUnits
);
[
~
,
refValues
,
log_prefix
]
=
itaValue
.
log_reference
(
this
.
channelUnits
);
if
sArgs
.
log_prefix
if
sArgs
.
log_prefix
log_prefix
=
sArgs
.
log_prefix
;
log_prefix
=
sArgs
.
log_prefix
;
end
end
...
@@ -772,7 +770,7 @@ classdef itaSuper < itaMeta
...
@@ -772,7 +770,7 @@ classdef itaSuper < itaMeta
[
sArgs
]
=
ita_parse_arguments
(
struct
(
'log_prefix'
,[]),
varargin
);
[
sArgs
]
=
ita_parse_arguments
(
struct
(
'log_prefix'
,[]),
varargin
);
%get logarithmic frequency data 20*log10(abs(Obj.freq)/referenceValue)
%get logarithmic frequency data 20*log10(abs(Obj.freq)/referenceValue)
[
x
,
refValues
,
log_prefix
]
=
itaValue
.
log_reference
(
this
.
channelUnits
);
[
~
,
refValues
,
log_prefix
]
=
itaValue
.
log_reference
(
this
.
channelUnits
);
if
sArgs
.
log_prefix
if
sArgs
.
log_prefix
log_prefix
=
sArgs
.
log_prefix
;
log_prefix
=
sArgs
.
log_prefix
;
end
end
...
@@ -856,7 +854,7 @@ classdef itaSuper < itaMeta
...
@@ -856,7 +854,7 @@ classdef itaSuper < itaMeta
methods
(
Hidden
=
true
)
methods
(
Hidden
=
true
)
function
res
=
legend
(
this
,
varargin
)
function
res
=
legend
(
this
,
varargin
)
% build a cell of strings for the plot legend
% build a cell of strings for the plot legend
if
nargin
==
1
;
if
nargin
==
1
mode
=
'log'
;
mode
=
'log'
;
else
else
mode
=
varargin
{
1
};
mode
=
varargin
{
1
};
...
@@ -864,7 +862,8 @@ classdef itaSuper < itaMeta
...
@@ -864,7 +862,8 @@ classdef itaSuper < itaMeta
channelNames
=
this
.
channelNames
;
channelNames
=
this
.
channelNames
;
channelUnits
=
this
.
channelUnits
;
channelUnits
=
this
.
channelUnits
;
channelUnits
(
strcmpi
(
channelUnits
,
''
))
=
{
'1'
};
channelUnits
(
strcmpi
(
channelUnits
,
''
))
=
{
'1'
};
res
=
{};
% res = {};
res
=
cell
(
1
,
this
.
nChannels
);
for
idx
=
1
:
this
.
nChannels
for
idx
=
1
:
this
.
nChannels
if
strcmpi
(
mode
,
'nodb'
)
if
strcmpi
(
mode
,
'nodb'
)
res
{
idx
}
=
[
channelNames
{
idx
}
' ['
channelUnits
{
idx
}
']'
];
res
{
idx
}
=
[
channelNames
{
idx
}
' ['
channelUnits
{
idx
}
']'
];
...
@@ -876,6 +875,7 @@ classdef itaSuper < itaMeta
...
@@ -876,6 +875,7 @@ classdef itaSuper < itaMeta
end
end
end
end
% TODO What is this supposed to do?
function
res
=
log_reference
(
this
)
function
res
=
log_reference
(
this
)
end
end
...
@@ -1012,6 +1012,7 @@ classdef itaSuper < itaMeta
...
@@ -1012,6 +1012,7 @@ classdef itaSuper < itaMeta
disp
(
this
.
LINE_END
);
disp
(
this
.
LINE_END
);
end
end
function
displayEndOfClass
(
this
,
classname
,
firstStr
)
function
displayEndOfClass
(
this
,
classname
,
firstStr
)
% TODO why?
if
exist
(
'firstStr'
,
'var'
)
if
exist
(
'firstStr'
,
'var'
)
end
end
classnameString
=
[
'('
classname
')'
];
classnameString
=
[
'('
classname
')'
];
...
@@ -1024,7 +1025,7 @@ classdef itaSuper < itaMeta
...
@@ -1024,7 +1025,7 @@ classdef itaSuper < itaMeta
if
nargin
==
1
% only get
if
nargin
==
1
% only get
for
idx
=
1
:
size
(
this
,
1
)
for
idx
=
1
:
size
(
this
,
1
)
for
jdx
=
1
:
size
(
this
,
2
)
for
jdx
=
1
:
size
(
this
,
2
)
for
ndx
=
1
:
this
(
idx
,
jdx
)
.
nChannels
;
for
ndx
=
1
:
this
(
idx
,
jdx
)
.
nChannels
result
(
idx
,
jdx
,
ndx
)
=
itaValue
(
1
,
this
(
idx
,
jdx
)
.
channelUnits
{
ndx
});
result
(
idx
,
jdx
,
ndx
)
=
itaValue
(
1
,
this
(
idx
,
jdx
)
.
channelUnits
{
ndx
});
end
end
end
end
...
@@ -1032,7 +1033,7 @@ classdef itaSuper < itaMeta
...
@@ -1032,7 +1033,7 @@ classdef itaSuper < itaMeta
else
% set values
else
% set values
for
idx
=
1
:
size
(
this
,
1
)
for
idx
=
1
:
size
(
this
,
1
)
for
jdx
=
1
:
size
(
this
,
2
)
for
jdx
=
1
:
size
(
this
,
2
)
for
ndx
=
1
:
this
(
idx
,
jdx
)
.
nChannels
;
for
ndx
=
1
:
this
(
idx
,
jdx
)
.
nChannels
this
(
idx
,
jdx
,
ndx
)
.
channelUnits
{
ndx
}
=
value
(
idx
,
jdx
);
this
(
idx
,
jdx
,
ndx
)
.
channelUnits
{
ndx
}
=
value
(
idx
,
jdx
);
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment