%#codegen
% Float2Fixed wrapper for function 'ones'
function z = onesx(varargin)
    coder.inline('always');
    if nargin > 1 && ischar(varargin{end})
        % class explicitly specified
        z = ones(f2f_size_vector(varargin{1:end-1}), varargin{end});
    elseif nargin >= 2 && ischar(varargin{end-1})
        % like syntax
        z = ones(f2f_size_vector(varargin{1:end-2}), varargin{end-1}, varargin{end});
    else
        % only dimension arguments
        z = ones(f2f_size_vector(varargin{:}));
    end    
end
