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: shang.m
    path of file: ./repos/Mathematical-Modeling/模型与算法集合/weights
    
    the code of the file until where you have to start completion: function w = shang(x,standard,flag)
% x 决策矩阵
% standard 是否已经处理化

    
function w = shang(x,standard,flag)
% x 决策矩阵
% standard 是否已经处理化
% flag 判断类型
%cols矩阵列表示评价指标
%行rows表示待选择方案

a=min(x);
b=max(x);
[rows,cols]=size(x);
if (nargin == 2 && standard == 0)
    flag = ones(1,cols);
end