This is a static copy of a profile report

Home

tabular.subsasgn (Calls: 8, Time: 0.032 s)
Generated 16-Jul-2020 17:09:56 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/datatypes/tabular/@tabular/subsasgn.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
hhsave_VFI_3OCfunction8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
70
t = move(t).subsasgnDot(s,b);
80.030 s94.1%
68
case '.'
80.000 s1.3%
57
creating = isnumeric(t) &&...
80.000 s1.3%
62
switch s(1).type
80.000 s0.7%
71
end
80.000 s0.5%
All other lines  0.001 s2.1%
Totals  0.032 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
tabular.subsasgnDotfunction80.029 s89.9%
Self time (built-ins, overhead, etc.)  0.003 s10.1%
Totals  0.032 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function74
Non-code lines (comments, blank lines)58
Code lines (lines that can run)16
Code lines that did run11
Code lines that did not run5
Coverage (did run/can run)68.75 %
Function listing
time 
Calls 
 line
   1 
function t = subsasgn(t,s,b)
   2 
%SUBSASGN Subscripted assignment to a table.
   3 
%   T = SUBSASGN(T,S,B) is called for the syntax T(I,J)=B, T{I,J}=B, or
   4 
%   T.VAR=B when T is a table.  S is a structure array with the fields:
   5 
%       type -- character vector containing '()', '{}', or '.' specifying the
   6 
%               subscript type.
   7 
%       subs -- Cell array or character vector containing the actual subscripts.
   8 
%
   9 
%   T(I,J) = B assigns the contents of the table B to a subset of the rows
  10 
%   and variables in the table T.  I and J are positive integers, vectors
  11 
%   of positive integers, row/variable names, cell arrays containing one or
  12 
%   more row/variable names, or logical vectors.  The assignment does not
  13 
%   use row names, variable names, or any other properties of B to modify
  14 
%   properties of T; however properties of T are extended with default
  15 
%   values if the assignment expands the number of rows or variables in T.
  16 
%   Elements of B are assigned into T by position, not by matching names.
  17 
%
  18 
%   T{I,J} = B assigns the values in the array B into elements of the table
  19 
%   T.  I and J are positive integers, or logical vectors.  Columns of B
  20 
%   are cast to the types of the target variables if necessary.  If the
  21 
%   table elements already exist, T{I,J} may also be followed by further
  22 
%   subscripting as supported by the variable.
  23 
%
  24 
%   T.VAR = B, T.(VARNAME) = B, or T.(VARINDEX) = B assigns B to a table
  25 
%   variable.  VAR is a variable name literal, VARNAME is a character
  26 
%   variable containing a variable name, or VARINDEX is a positive integer.
  27 
%   If the table variable already exists, the assignment completely
  28 
%   replaces that variable.  To assign into an element of the variable,
  29 
%   T.VAR, T.(VARNAME), or T.(VARINDEX) may be followed by further
  30 
%   subscripting as supported by the variable.  In particular,
  31 
%   T.VAR(ROWNAMES,...) = B, T.VAR{ROWNAMES,...} = B, etc. (when supported
  32 
%   by VAR) provide assignment into a table variable using row names.
  33 
%
  34 
%   T.PROPERTIES.PROPERTYNAME = P assigns to a table property.  PROPERTYNAME
  35 
%   is 'RowNames', 'VariableNames', 'Description', 'VariableDescriptions',
  36 
%   'VariableUnits', 'DimensionNames', or 'UserData'.  To assign into an element
  37 
%   of the property, T.PROPERTIES.PROPERTYNAME may also be followed by further
  38 
%   subscripting as supported by the property.
  39 
%
  40 
%   LIMITATIONS:
  41 
%  
  42 
%      You cannot assign multiple values into a table variable or property using
  43 
%      assignments such as
  44 
%         [A.CellVar{1:2}] = deal(B1,B2),
  45 
%         [A.StructVar(1:2).field] = deal(B1,B2), or
  46 
%         [A.Properties.ObsNames{1:2}] = deal(B1,B2)
  47 
%      Use multiple assignments of the form A.CellVar{1} = B1 instead.
  48 
%
  49 
%   See also TABLE, SUBSREF.
  50 

  51 
%   Copyright 2012-2019 The MathWorks, Inc.
  52 

  53 
% Avoid unsharing of shared-data copy across function call boundary
  54 
import matlab.lang.internal.move
  55 

< 0.001 
      8 
  56
try 
< 0.001 
      8 
  57
    creating = isnumeric(t) && isequal(t,[]); 
< 0.001 
      8 
  58
    if creating 
  59 
        t = b.cloneAsEmpty;
< 0.001 
      8 
  60
    end 
  61 

< 0.001 
      8 
  62
    switch s(1).type 
< 0.001 
      8 
  63
    case '()' 
  64 
        t = move(t).subsasgnParens(s,b,creating);
< 0.001 
      8 
  65
    case '{}' 
  66 
        %assert(~creating)
  67 
        t = move(t).subsasgnBraces(s,b);
< 0.001 
      8 
  68
    case '.' 
  69 
        %assert(~creating)
  0.030 
      8 
  70
        t = move(t).subsasgnDot(s,b); 
< 0.001 
      8 
  71
    end 
  72 
catch ME
  73 
    throwAsCaller(ME)
< 0.001 
      8 
  74
end 

Other subfunctions in this file are not included in this listing.