Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • develop protected
  • big_2017_api_change
  • VA_v2024a
  • VA_v2023b
  • VA_v2023a
  • before_VANet_update
  • VA_v2022a
  • before_cmake_rework
  • v2021.a
  • v2020.a
  • v2019.a
  • v2018.b
  • v2017.c
  • v2017.a
  • v2016.a
16 results

VAMatlab.def

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    min.m 996 B
    function varargout = min(varargin)
    %normal minimum value
    
    % <ITA-Toolbox>
    % This file is part of the ITA-Toolbox. Some rights reserved. 
    % You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder. 
    % </ITA-Toolbox>
    
    narginchk(1,1);
    result = varargin{1};
    if numel(result)>1 %get min over multiple instances and not over channel of each struct
        tmp = result(1);
        data = zeros(size(tmp.data,1),prod(tmp.dimensions),numel(result));
        for i = 1:numel(result)
            data(:,:,i) = result(i).data;
        end
        result = result(1);
        result.data = squeeze(min(data,[],3));
    else % min over channels
        result.data = min(result.data,[],2);
    end
    
    resChannelNames = result.channelNames;
    for idxCh = 1:result.nChannels   %alter name field of all channels
        resChannelNames{idxCh} = ['min(' resChannelNames{idxCh} ')'];
    end
    result.channelNames = resChannelNames;
    
    %% Add history line
    varargout{1} = ita_metainfo_add_historyline(result,'itaSuper.min',varargin);
    end