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: Murat_rescale.m
    path of file: ./repos/MuRAT/bin
    
    the code of the file until where you have to start completion: function [X,Y,Z,modvR,mR]	=   Murat_rescale(x_o,y_o,z_o,v_o,x,y,z)
% function [modvR,mR]	=   Murat_rescale(x_o,y_o,z_o,v_o,x,y,z)
% 
% RESCALE field to output reference system
%
% Input parameters:
%    x_o,y_o,z_o:	original reference system

    
function [X,Y,Z,modvR,mR]	=   Murat_rescale(x_o,y_o,z_o,v_o,x,y,z)
% function [modvR,mR]	=   Murat_rescale(x_o,y_o,z_o,v_o,x,y,z)
% 
% RESCALE field to output reference system
%
% Input parameters:
%    x_o,y_o,z_o:	original reference system
%    v_o:           original field
%
% Output parameters:
%    modvR:         rescaled field

[X,Y,Z]                     =   meshgrid(x,y,z);
mR                          =   griddata(x_o,y_o,z_o,v_o,X,Y,Z);

if find(isnan(mR))
    mR             =   inpaintn(mR);
end