与えられた配列:
array1 = [1 2 3];
次のように逆にする必要があります。
array1MirrorImage = [3 2 1];
これまでのところ、私はこの醜い解決策を得ました:
array1MirrorImage = padarray(array1, [0 length(array1)], 'symmetric', 'pre');
array1MirrorImage = array1MirrorImage(1:length(array1));
これに対するより良い解決策はありますか?