function yesno = areBlockInputsSimpleScalar(blockH)
    % If every input port of the block are simple scalar types, return yes.

    yesno = true;
    phs = get_param(blockH, 'PortHandles');

    for i = 1:length(phs.Inport)
        yesno = yesno && ...
        isInportScalar(phs.Inport(i));
    end
end

function yesno = isInportScalar(portH)
    % A port is not scalar, if its type is a vector, mux or a bus.
    yesno = true;

    % First check whether the inport has a width more than one. This can happen
    % with vectors and/or muxes.
    if get_param(portH, 'CompiledPortWidth') > 1
        yesno = false;
    end

    % if the port is of bus type, then again this is not a scalar
    if ~strcmp(get_param(portH, 'CompiledBusType'), 'NOT_BUS')
        yesno = false;
    end
end
