This is a static copy of a profile report

Home

Function details for eigs>isBpresentThis is a static copy of a profile report

Home

eigs>isBpresent (Calls: 1, Time: 0.000 s)
Generated 03-Jul-2019 20:31:55 using performance time.
subfunction in file C:\Program Files\MATLAB\R2019a\toolbox\matlab\sparfun\eigs.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
eigs>checkInputssubfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
502
return;
10.000 s21.9%
479
if isempty(B) % allow eigs(A,[...
10.000 s13.4%
483
if ~isnumeric(B)
10.000 s11.4%
487
if ~isscalar(B)
10.000 s8.5%
498
if n ~= 1
10.000 s8.2%
All other lines  0.000 s36.6%
Totals  0.000 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function42
Non-code lines (comments, blank lines)12
Code lines (lines that can run)30
Code lines that did run6
Code lines that did not run24
Coverage (did run/can run)20.00 %
Function listing
time 
Calls 
 line
 477 
function Bpresent = isBpresent(B, nin, Amatrix, n)
 478 

< 0.001 
      1 
 479
if isempty(B) % allow eigs(A,[],k,sigma,opts); 
 480 
    Bpresent = true; % this will cause input [] to be skipped
 481 
    return;
 482 
end
< 0.001 
      1 
 483
if ~isnumeric(B) 
 484 
    Bpresent = false;
 485 
    return;
 486 
end
< 0.001 
      1 
 487
if ~isscalar(B) 
 488 
    % B is not a scalar.
 489 
    if ~isa(B,'double')
 490 
        error(message('MATLAB:eigs:BnonDouble'));
 491 
    elseif ~isequal(size(B), [n,n])
 492 
        error(message('MATLAB:eigs:BsizeMismatchA'));
 493 
    end
 494 
    Bpresent = true;
 495 
    return;
 496 
end
 497 

< 0.001 
      1 
 498
if n ~= 1 
 499 
    % B is a numeric scalar, and A is not scalar:
 500 
    % This input is really K and B is not specified
< 0.001 
      1 
 501
    Bpresent = false; 
< 0.001 
      1 
 502
    return; 
 503 
end
 504 
% This input could be B or K.
 505 
% If A is scalar, then the only valid value for k is 1.
 506 
% So if this input is scalar, let it be B, namely
 507 
% eigs(4,2,...) assumes A=4, B=2, NOT A=4, k=2
 508 
% Unless, of course, the scalar is 1, in which case
 509 
% assume that it is meant to be K.
 510 
if (B == 1) && ((Amatrix && nin <= 4) || (~Amatrix && nin <= 5))
 511 
    Bpresent = false;
 512 
else
 513 
    Bpresent = true;
 514 
    if ~isa(B,'double')
 515 
        error(message('MATLAB:eigs:BnonDouble'));
 516 
    end
 517 
end
 518 
end

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