% Script/Function Filename:
%     updateB.m
% Purpose:
%     Enter the purpose of the function/file here
%     
% Record of modifications:
%     Programmer(s): {Your Name}
%     Date Due: YYYY-MM-DD
%     Date Submitted: YYYY-MM-DD
%     References: ????
%     Help Received: ????
%     
% Variables Used:
%     Enter the variables that you use here
function [] = updateB( source , ~ )
data = get( 1 , 'UserData' );
aSlider = data{ 1 };
bSlider = source;
cSlider = data{ 3 };
a = get( aSlider , 'Value' );
b = get( bSlider , 'Value' );
c = get( cSlider , 'Value' );
shapeT = data{ 5 };
infoT = data{ 6 };
[ X , Y , Z ] = ellipsoid( 0 , 0 , 0 , a , b , c , 100 );
surf( X , Y , Z , 'EdgeColor' , [ 0 0 0 ] , 'FaceColor' , [ 0 0 1 ] );
if( get( shapeT , 'Value' ) == 0 && get( infoT , 'Value' ) == 0 )
    vol = ellipsoidInfo( a );
    info = sprintf( 'Radius: %.2f Volume: %.2f' , a , vol );
elseif( get( shapeT , 'Value' ) == 0 && get( infoT , 'Value' ) == 1 )
    [ vol , area ] = ellipsoidInfo( a );
    info = sprintf( 'Radius: %.2f Volume: %.2f Area: %.2f' , a , vol , area );
elseif( get( shapeT , 'Value' ) == 1 && get( infoT , 'Value' ) == 0 )
    vol = ellipsoidInfo( a , b , c );
    info = sprintf( 'a: %.2f b: %.2f c: %.2f Volume: %.2f' , a , b , c , vol );
else    
    [ vol , area ] = ellipsoidInfo( a , b , c );
    info = sprintf( 'a: %.2f b: %.2f c: %.2f Volume: %.2f Area: %.2f' , a , b , c , vol , area );
end
set( 1 , 'Name' , info );end