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: Rad229_Conventional_FlowComp.m
    path of file: ./repos/MRSignalsSeqs/Matlab
    
    the code of the file until where you have to start completion: %% Rad229_Conventional_FlowComp – Demonstrate designing a flow-compensated gradient waveform.
%
%  Based, in part, on this paper:
%
%    Encoding strategies for three-direction phasecontrast MR imaging of flow. 
%   
    
function [G_FC, M0S, M1S, t_ss, G_ss, M0_FC, M1_FC, t_FC] = Rad229_Conventional_FlowComp(params)

% Build the slice select gradient
Gss_plat = linspace( params.g_ss , params.g_ss , ceil( params.p_ss / params.dt ) );
% Gss_down = linspace( params.g_ss , params.g_ss / 10 , 10 );
Gss_down = linspace( params.g_ss , 0 , 10 );

G_ss = [ Gss_plat Gss_down ];

t_ss = length(G_ss) * params.dt;
t_vec = 0 : params.dt : (length(G_ss)-1)*params.dt;

% Get moments of the slice select that we need to compensate
M0S = cumsum( (G_ss .* params.dt) , 2);            % [T/m x s]
M1S = cumsum( (G_ss .* t_vec * params.dt) , 2);    % [T/m x s^2]

% Moments at end