echo on
clear all
close all
clc
echo off

%Set Default Surface EdgeColor to Blue
disp('Hit any key to set the DEFAULT Surface EdgeColor to Blue')
pause
echo on
set(0, 'DefaultSurfaceEdgeColor', 'b')

echo off
%Plot a surface.
disp('Hit any key to draw surface with new Default EdgeColor')
pause
echo on
h=surf(peaks(15));

echo off
%Change EdgeColor to Green.
disp('Hit any key to change EdgeColor to Green')
pause
echo on
set(h, 'EdgeColor', 'g')

echo off
%Reset EdgeColor to Default.
disp('Hit any key to reset EdgeColor to DEFAULT (blue)')
pause
echo on
set(h, 'EdgeColor', 'default')

echo off
%Reset EdgeColor to Factory Settings.
disp('Hit any key to reset EdgeColor to Factory value (black)')
pause
echo on
set(h, 'EdgeColor', 'factory')

echo off
%Return Default EdgeColor to Factory Setting.
disp('Next we will return the DEFAULT EdgeColor to the Factory value')
disp('Hit any key to continue');
pause
echo on
set(0, 'DefaultSurfaceEdgeColor', 'factory')

% NOTE: This is the same as:
% --------------------------
% set(0, 'DefaultSurfaceEdgeColor', 'remove')

echo off

%Draw new surface.
disp('Hit any key to close the figure and draw new surface')
disp('(with restored DEFAULT EdgeColor - black)')
pause
echo on
close
h = surf(peaks(15));

echo off