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: ssPlace.m
    path of file: ./repos/LADAC/control/linear_systems
    
    the code of the file until where you have to start completion: function k = ssPlace( A, B, p )
% ssPlace compute the feedback gain of state-space model that yields a

    
function k = ssPlace( A, B, p )
% ssPlace compute the feedback gain of state-space model that yields a
% system with the desired eigenvalues (pole placement)
% 
% Syntax:
%   k = ssPlace( A, B, p )
% 
% Inputs:
%   A               system matrix (NxN array)
%   B               input matrix (Nx1 array)
%   p               desired poles (1xN array)
% 
% Outputs:
%   k               full state feedback gain (1xN array)
% 
% Example:
%   A = rand(4,4);
%   b = rand(4,1);
%   p = [-1,-2+2i,-2-2i,-3];
%   k = ssPlace( A, b, p );
%   figure, hold on
%   h1=plot(real(eig(A)),imag(eig(A)),'x')
%   h2=plot(real(p),imag(p),'+')
%   h3=plot(real(eig(A-b*k)),imag(eig(A-b*k)),'o')
%   legend