Code covered by the BSD License  

Highlights from
Toolbox signal

image thumbnail
from Toolbox signal by Gabriel Peyre
Signal processing related functions.

array_set_val( x, ind, v )
function y = array_set_val( x, ind, v )

% array_set_val - set a value in a multidimensional array using a vector for the index
%
%   y = array_set_val( x, ind, v );
%
%   Copyright (c) 2004 Gabriel Peyr

ind = num2cell(ind);
x( ind{:} ) = v;
y = x;

Contact us at files@mathworks.com