    clc;close all;clear all;
    % Apply scale transformation to an MRI volume using the function imwarp
    A = load('mri');
    A = squeeze(A.D);
    Sx = 1.2;
    Sy = 1.6;
    Sz = 2.4;
    tform = affine3d([Sx 0 0 0; 0 Sy 0 0; 0 0 Sz 0; 0 0 0 1]);
    outputImage = imwarp(A,tform);
    
    % Visualize axial slice through center of transformed volume to see
    % effect of scale transformation.
    figure, imshowpair(A(:,:,14),outputImage(:,:,27));