-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathshili87.m
58 lines (58 loc) · 1.73 KB
/
shili87.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
h0=figure('toolbar','none',...
'position',[200 150 450 250]);
h1=axes('parent',h0,...
'position',[0.05 0.15 0.65 0.6],...
'visible','off');
I=imread('abmatrix.bmp','bmp');
image(I)
axis off
huidiao=[...
'a=[1 0 3 0;0 2 1 2;3 1 15 0;0 2 0 4;];,',...
'b=[1 6 5 8]'';,',...
'r=[a,b];,',...
'n=4;,',...
'tic,',...
'x=ch(a,b,n);,',...
'time1=toc;,',...
'T=num2str(time1);,',...
'set(e1,''string'',[T,''秒'']);,',...
'msgbox([''X=['',num2str(x(1)),num2str(x(2)),num2str(x(3)),num2str(x(4)),'']''],''方程组的解'');'];
t1=uicontrol('parent',h0,...
'units','points',...
'tag','t1',...
'style','text',...
'string','方程组如下:',...
'fontsize',15,...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[20 150 100 20]);
e1=uicontrol('parent',h0,...
'units','points',...
'tag','e1',...
'style','edit',...
'horizontalalignment','right',...
'backgroundcolor',[1 1 1],...
'position',[290 100 30 20]);
t2=uicontrol('parent',h0,...
'units','points',...
'tag','t2',...
'style','text',...
'string','计算时间:',...
'fontsize',15,...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[250 125 80 20]);
b1=uicontrol('parent',h0,...
'units','points',...
'tag','b1',...
'style','pushbutton',...
'string','平方根法',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[250 60 60 20],...
'callback',huidiao);
b2=uicontrol('parent',h0,...
'units','points',...
'tag','b2',...
'string','关闭',...
'style','pushbutton',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[250 30 60 20],...
'callback','close');