You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sparse_inp_native.m
    path of file: ./repos/MALSAR/MALSAR/c_files/largescale_ops
    
    the code of the file until where you have to start completion: function [ out ] = sparse_inp_native( U, V, iR, iC )
%SPARSE_INP inner-product and apply sparse selection.

    
function [ out ] = sparse_inp_native( U, V, iR, iC )
%SPARSE_INP inner-product and apply sparse selection.
%   Perform the following:
%       UV = U * V, out(ii) = UV(iR(ii), iC(ii)); 

    len = length(iC);
    out = zeros(len, 1); 
    
    for ii = 1: len
        out(ii) = U(iR(ii), :) * V(:,iC(ii)); 
    end