Thanks everyone,
I though I solved it.
When object [sld] is created, u can change its attribute like
sld.Orientation = 'vertical';
clc;
clear;
close all;
fig = uifigure('Position',[100 100 350 275]);
cg=0;
sld = uislider(fig,...
'Position',[ 100 100 100 100],...
'ValueChangingFcn',@(sld, event) sliderMoving(event,cg));
sld.Orientation = 'vertical';