7-3 以命令????形?件?性質存?

ڭ̤]iHϥΫOC覡ӧܤ@ӹϧΪUةʽA̱`Ψ쪺O set P get OA䤤 set OiΨӳ]wYөʽ誺ȡA get OhΨөoYөʽ誺ȡC]ƹWҦHGUIӶiϧέק諸uA]OϥγoӫOӧC^

bUCdҤAڭ̥ͤ@uAAϥ set Oӭק惡uUةʽApUG

Example 1: 07-⦡ϧλPGUI]p/hg02.mt = 0:0.1:4*pi; y = exp(-t/5).*sin(t); h = plot(t, y); % h u set(h, 'Linewidth', 3); % Nueקאּ 3 set(h, 'Marker', 'o'); % NuuЧ令p set(h, 'MarkerSize', 20); % NuЪjp令 20

ڭ̤]iHNWzT set OX@ӫOG

set(h, 'LineWidth', 3, 'Marker', 'o', 'MarkerSize', 20);

]iHWϥ set(h) ӦCX h Ҧi઺ʽAҦpG

Example 2: 07-⦡ϧλPGUI]p/hgSet01.mh=plot(rand(1,10)); % h u fprintf('MATLAB version = %s\n', version); set(h) % CX h ҦʽMATLAB version = 8.5.0.197613 (R2015a) AlignVertexCenters: {'on' 'off'} BusyAction: {'queue' 'cancel'} ButtonDownFcn: {} Children: {} Clipping: {'on' 'off'} Color: {1x0 cell} CreateFcn: {} DeleteFcn: {} DisplayName: {} HandleVisibility: {'on' 'callback' 'off'} HitTest: {'on' 'off'} Interruptible: {'on' 'off'} LineStyle: {'-' '--' ':' '-.' 'none'} LineWidth: {} Marker: {1x14 cell} MarkerEdgeColor: {'none' 'flat' 'auto'} MarkerFaceColor: {'none' 'flat' 'auto'} MarkerSize: {} Parent: {} PickableParts: {'visible' 'none' 'all'} Selected: {'on' 'off'} SelectionHighlight: {'on' 'off'} Tag: {} UIContextMenu: {} UserData: {} Visible: {'on' 'off'} XData: {} XDataMode: {'auto' 'manual'} XDataSource: {} YData: {} YDataSource: {} ZData: {} ZDataSource: {}

YoY@өʽ誺ȡAi get OAҦpAo h CAiJpUG

get(h, 'Color')

Yno h Ҧʽ誺ȡAi get(h)AҦpG

Example 3: 07-⦡ϧλPGUI]p/hgGet01.mt=0:0.4:4*pi; h=plot(t, exp(-t/5).*sin(t)); % h u set(h, 'Marker', 'diamond', 'MarkerSize', 15, 'MarkerFaceColor', 'r'); % NuЧ令٧ΡBuФjp令 15BuЪ令 fprintf('MATLAB version = %s\n', version); get(h) % CX h ҦʽMATLAB version = 8.5.0.197613 (R2015a) AlignVertexCenters: 'off' Annotation: [1x1 matlab.graphics.eventdata.Annotation] BeingDeleted: 'off' BusyAction: 'queue' ButtonDownFcn: '' Children: [] Clipping: 'on' Color: [0 0.4470 0.7410] CreateFcn: '' DeleteFcn: '' DisplayName: '' HandleVisibility: 'on' HitTest: 'on' Interruptible: 'on' LineStyle: '-' LineWidth: 0.5000 Marker: 'diamond' MarkerEdgeColor: 'auto' MarkerFaceColor: [1 0 0] MarkerSize: 15 Parent: [1x1 Axes] PickableParts: 'visible' Selected: 'off' SelectionHighlight: 'on' Tag: '' Type: 'line' UIContextMenu: [] UserData: [] Visible: 'on' XData: [1x32 double] XDataMode: 'manual' XDataSource: '' YData: [1x32 double] YDataSource: '' ZData: [1x0 double] ZDataSource: ''

Wz get M set iHqΩ MATLAB UتAO^ǪGä|@ˡA]H MATLAB sAC@ӹϧΪ󪺩ʽ賣|VӶVhC]]bWzdҤAڭ̯SOLX榹{ҥΪ MATLAB C^

@ӨAC@ӹϧΪ󪺩ʽ賣ƤQؤhAu`Ψ쪺ʽjQءC

t@ӱ`Ψ쪺OO findobjAufind objectsv²١AOib⦡ϧΪhcAXznCҦpA@ӹϧεҦuAiyUCdҡG

Example 4: 07-⦡ϧλPGUI]p/findobj01.mplot(rand(10, 2)); % eXu h=findobj(0, 'type', 'line') % Xu set(h, 'LineWidth', 3); % gѴNueקאּ 3 h = 2x1 <a href="matlab:helpPopup matlab.graphics.chart.primitive.Line" style="font-weight:bold">Line</a> array: Line Line

bWҤĤGӱԭzAu0vN MATLAB ୱA]WҪGBTCԭzNquXҦA line AñN䦱ueקאּ 3vAǦ^Vq h ׬ 2AN@ӫA line C

Hint
bWzdҤAh(1) M h(2) OOuAO̪ƭȡAuOΨӥNAèSjpΥt譱PƦrNqC


MATLAB{]pGJg