📄 b4m.ps
字号:
909 y(stabilit)o(y)e(and)g(robustness,)j(so)e(man)o(y)d(op)q(erations)j
(could)g(b)q(e)g(impro)o(v)o(ed)e(b)o(y)i(omitting)d(the)257
959 y(error)15 b(handling.)i(Ho)o(w)o(ev)o(er,)d(this)g(seems)g(to)g(b)
q(e)g(con)o(trary)g(to)g(the)h(goals)e(of)j Fh(Ma)m(tlab)p
Fl(.)320 1009 y(The)11 b(installation)f(is)h(simple,)f(the)i(whole)f
(pac)o(k)n(age)g(is)g(distributed)h(as)f(one)h(pac)o(k)o(ed)f(\014le)
257 1059 y(whic)o(h)k(has)g(to)f(b)q(e)h(unpac)o(k)o(ed)g(\(Windo)o
(ws\))f(or,)h(additionally)d(the)j(Mex-\014les)g(ha)o(v)o(e)f(to)h(b)q
(e)257 1108 y(compiled)c(using)h Fk(make)f Fl(\(Unix\).)18
b(It)12 b(is)g(easier)g(to)g(install)f(the)i(pac)o(k)n(age)f(with)f
(precompiled)257 1158 y(Mex-\014les)i(b)q(ecause)g(this)f(v)o(ersion)g
(do)q(es)g(not)g(build)f(up)q(on)g(a)h(previously)f(installed)g(v)o
(ersion)257 1208 y(of)17 b(BIAS.)g(Ho)o(w)o(ev)o(er,)i(the)f
(precompiled)e(v)o(ersion\(s\))i(mak)o(e)e(no)h(use)h(of)f(the)h
(underlying)257 1258 y(arc)o(hitecture)f(and)d(are)i(sometimes)d(slo)o
(w)o(er)h(b)o(y)h(a)f(factor)h(of)f(10)g(compared)g(to)h(a)f(v)o
(ersion)257 1308 y(compiled)f(on)g(the)i(giv)o(en)e(mac)o(hine.)320
1357 y Fk(b4m)e Fl(has)h(b)q(een)h(implem)o(en)o(ted)d(b)o(y)i(the)g
(author)g(in)f(1998.)16 b(It)c(is)g(distributed)g(under)h(the)257
1407 y(TI3)h(cop)o(yrigh)o(t)f(license)i(and)f(can)g(b)q(e)g(copied)h
(freely)m(.)i(F)m(or)d(details)g(see)h(the)f(\014le)257
1486 y Fk(../matlab/toolbox/b)o(4m/CO)o(PYING)257 1564
y Fl(in)g(the)g Fk(b4m)g Fl(distribution.)257 1700 y
Fj(3)67 b(Installation)24 b(of)e(b4m)257 1791 y Fl(Curren)o(tly)m(,)15
b(t)o(w)o(o)g(v)o(ersions)g(of)f(the)i Fk(b4m)e Fl(pac)o(k)n(age)h(are)
g(a)o(v)n(ailable.)k(The)d(original)d(pac)o(k)n(age)257
1841 y(consists)g(of)e(the)i(source)g(co)q(de,)f(Mak)o(e\014les)h(and)e
(do)q(cumen)o(tation.)16 b(It)c(has)g(to)g(b)q(e)g(compiled)257
1891 y(for)h(the)g(giv)o(en)g(arc)o(hitecture.)19 b(This)13
b(presumes)g(the)h(existence)g(of)e(a)h(compiled)e(v)o(ersion)i(of)257
1941 y(BIAS)h(and)e(a)h(C)g(compiler)e(that)i(is)g(supp)q(orted)h(b)o
(y)f Fh(Ma)m(tlab)h Fl(to)f(compile)e(the)i(Mex-\014les.)320
1990 y(The)h(other)h(v)o(ersion)f(of)g(the)h(pac)o(k)n(age)f(includes)g
(the)h(source)g(co)q(de,)g(Mak)o(e\014les,)f(do)q(cu-)257
2040 y(men)o(tation)9 b(and)h(precompiled)f(Mex-\014les.)18
b(This)10 b(v)o(ersion)g(is)g(mac)o(hine)f(dep)q(enden)o(t.)18
b(Up)11 b(to)257 2090 y(no)o(w,)h(a)g(precompiled)f(v)o(ersion)h(for)g
(PC)g(running)g(under)h(Windo)o(ws)e(can)h(b)q(e)h(do)o(wnloaded.)257
2140 y(This)h(v)o(ersion)g(has)g(to)g(b)q(e)g(unpac)o(k)o(ed)h
(\(e.g.\))j(in)13 b(the)i(directory)257 2218 y Fk(C:\\Matlab\\Toolbox)
257 2297 y Fl(and)f(will)e(pro)q(duce)k(a)d(new)i(directory)257
2375 y Fk(C:\\Matlab\\Toolbox\\b)o(4m)257 2453 y Fl(including)g(the)i
(new)f(to)q(olb)q(o)o(x.)23 b(The)17 b(path)f(to)f Fk(b4m)h
Fl(has)g(to)f(b)q(e)i(added)f(to)g(the)g Fh(Ma)m(tlab)257
2503 y Fl(searc)o(h)f(path.)963 2628 y(4)p eop
5 4 bop 257 262 a Fl(The)14 b(non-compiled)e(v)o(ersion)i(needs)h
(BIAS.)e(BIAS)i(has)e(to)h(b)q(e)g(compiled)e(with)h(the)i(\015ags)257
311 y(in)f(the)g(\014le)g Fk(BiasInt.h)e Fl(set)j(as)f(indicated)g(in)f
(Figure)h(1.)257 390 y Fg(/**********)o(***)o(***)o(***)o(***)o(**)o
(***)o(***)o(***)o(**)o(***)o(***)o(***)o(***)o(**)o(***)o(***)o(***)o
(***)o(**)o(***)o(***)o(***)257 429 y(*)35 b(User)17
b(definable)d(controls)257 469 y(***********)o(***)o(***)o(***)o(***)o
(**)o(***)o(***)o(***)o(**)o(***)o(***)o(***)o(***)o(**)o(***)o(***)o
(***)o(***)o(**)o(***)o(***)o(***)o(/)257 548 y(#undef)34
b(__BIASRAI)o(SED)o(IVI)o(DE)o(BYZ)o(ERO)o(__)120 b(/*)17
b(if)g(defined,)e(division)f(by)j(zero)g(aborts;)1016
587 y(otherwise,)d(bounds)i(containin)o(g)f(+/-oo)1016
627 y(or)i(NaN)f(are)h(computed.)d(*/)257 666 y(#define)i(__BIASSET)o
(ROU)o(NDT)o(ON)o(EAR)o(EST)o(__)120 b(/*)17 b(if)g(defined,)e
(rounding)f(mode)j(is)g(set)f(to)1016 706 y(nearest)f(after)h(each)g
(operation)f(*/)580 838 y Fl(Figure)f(1:)k(Setting)c(of)f(con)o(trols)h
(in)g Fk(BiasInt.h)257 936 y Fl(If)257 1014 y Fk(__BIASRAISEDIVIDEBY)o
(ZERO_)o(_)257 1093 y Fl(is)f(de\014ned,)h(a)f(division)f(b)o(y)h(zero)
h(or)f(a)g(similar)d(op)q(eration)j(ma)o(y)e(cause)k
Fh(Ma)m(tlab)f Fl(or)f(ev)o(en)257 1143 y(y)o(our)h(whole)g(system)f
(to)h(crash.)19 b(If)257 1221 y Fk(__BIASSETROUNDTONEA)o(REST_)o(_)257
1300 y Fl(is)14 b(not)g(de\014ned,)h(extensiv)o(e)g(\015oating)e(p)q
(oin)o(t)h(computations)f(ma)o(y)f(b)q(e)j(p)q(erturb)q(ed)h(and)e(b)q
(e)257 1350 y(less)h(reliable.)320 1399 y(After)f(BIAS)f(has)h(b)q(een)
g(compiled,)e(the)i Fk(b4m)e Fl(pac)o(k)n(age)h(has)h(to)f(b)q(e)h
(unpac)o(k)o(ed,)f(e.g.)18 b(in)257 1449 y(the)d(directory)257
1528 y Fk(../matlab/toolbox/)257 1606 y Fl(and)f(will)e(pro)q(duce)k(a)
d(directory)257 1685 y Fk(../matlab/toolbox/b)o(4m/)257
1763 y Fl(with)h(sub)q(directories)257 1842 y Fk(../matlab/toolbox/b)o
(4m/pr)o(ivate)o(/)257 1892 y(../matlab/toolbox/b)o(4m/do)o(cu/)257
1942 y(../matlab/toolbox/b)o(4m/@i)o(nterv)o(al/)257
1991 y(../matlab/toolbox/b)o(4m/@i)o(nterv)o(al/pr)o(ivate)o(/)257
2060 y Fl(con)o(taining)f(the)i(source)g(co)q(de)g(and)e(the)i(do)q
(cumen)o(tation.)i(The)d(lines)257 2128 y Fg(LIBDIR)86
b(=)18 b(/home/ti3/)o(jz)o(/li)o(b)32 b(#)18 b(the)e(directory)f(where)
g(you)i(have)f(installed)f(BIAS)804 2167 y(#)j(BIAS)e(can)g(be)h
(downloaded)d(at)804 2207 y(#)k(http://ww)o(w.t)o(i3.)o(tu)o(-ha)o(rbu)
o(rg.)o(de)257 2246 y(DLL)140 b(=)18 b(mexrs6)257 2286
y(INCLUDEDIR)c(=)k(/home/ti3/)o(jz)o(/in)o(clu)o(de)32
b(#)17 b(the)g(directory)d(with)i(the)h(include)e(files)875
2325 y(#)i(Bias0.h)e(Bias1.h)g(Bias2.h)h(BiasF.h)f(...)257
2403 y Fl(in)h(the)h(Mak)o(e\014les)f(in)f(the)i Fk(private/)d
Fl(directories)k(ha)o(v)o(e)d(to)h(b)q(e)h(mo)q(di\014ed)e(according)h
(to)257 2453 y(y)o(our)e(system.)k(Afterw)o(ards)d(the)f(Mex-\014les)h
(can)f(b)q(e)g(compiled)f(using)h Fk(make)p Fl(.)320
2503 y(If)f(another)h(directory)h(than)963 2628 y(5)p
eop
6 5 bop 257 262 a Fk(../matlab/toolbox/)257 344 y Fl(has)11
b(b)q(een)h(c)o(hosen,)f(the)h(path)e(to)h Fk(b4m)f Fl(has)g(to)h(b)q
(e)g(added)g(to)f(the)h(searc)o(h)h(path)f(of)i Fh(Ma)m(tlab)p
Fl(.)320 394 y(T)m(o)i(p)q(erform)h(a)g(c)o(hec)o(k)h(whether)h
Fk(b4m)e Fl(is)g(installed)g(prop)q(erly)h(just)g(try)f(some)g(of)g
(the)257 443 y(examples)d(giv)o(en)h(in)f(this)h(do)q(cumen)o(tation.)
257 581 y Fj(4)67 b(The)22 b(class)g(in)n(terv)l(al)257
671 y Fl(The)15 b(new)f(datat)o(yp)q(e)g(\(class\))h
Fk(interval)d Fl(in)h Fh(Ma)m(tlab)i Fl(consists)g(of)e(a)h(directory)
257 754 y Fk(../matlab/toolbox/b)o(4m/@i)o(nterv)o(al/)257
836 y Fl(\(the)h(class)f(directory\))h(outside)f(the)h(searc)o(h)g
(path)f(\(V)-5 b(AX/VMS)14 b(uses)i Fk($)d Fl(instead)h(of)g
Fk(@)p Fl(\).)320 886 y(Inside)k(the)h(class)f(directory)h(all)e(o)o(v)
o(erloaded)h(functions)g(and)g(op)q(erations,)h(the)g(so-)257
936 y(called)14 b(metho)q(ds)f(of)g(the)h(class)g Fk(interval)p
Fl(,)e(are)i(stored)g(as)g(a)g(collection)f(of)g(M-\014les.)18
b(The)257 985 y(most)13 b(imp)q(ortan)o(t)f(is)i(the)g(constructor)257
1068 y Fk(../matlab/toolbox/b)o(4m/@i)o(nterv)o(al/in)o(terva)o(l.m)257
1150 y Fl(whic)o(h)21 b(is)f(in)o(v)o(ok)o(ed)g(ev)o(ery)h(time)e(a)i
(new)g(instance)g(\(ob)r(ject\))h(of)e(the)h(class)g(has)f(to)h(b)q(e)
257 1200 y(constructed)16 b(from)d(previous)h(de\014ned)h(ones,)f(and)f
(is)257 1282 y Fk(../matlab/toolbox/b)o(4m/@i)o(nterv)o(al/di)o(splay)o
(.m)257 1364 y Fl(whic)o(h)h(serv)o(es)i(as)e(command)d(windo)o(w)i
(displa)o(y)m(.)p 472 1423 1003 2 v 471 1473 2 50 v 497
1458 a Fk(@interval/)266 b Fl(class)14 b(directory)p
1474 1473 V 472 1475 1003 2 v 471 1525 2 50 v 497 1510
a Fk(@interval/interva)o(l.m)47 b Fl(class)14 b(constructor)p
1474 1525 V 472 1526 1003 2 v 471 1576 2 50 v 497 1561
a Fk(@interval/display)o(.m)69 b Fl(command)11 b(windo)o(w)i(displa)o
(y)p 1474 1576 V 472 1578 1003 2 v 640 1694 a(Figure)h(2:)k(The)c
(class)h Fk(interval)d Fl(in)h Fk(b4m)257 1793 y Fl(In)h
Fk(b4m)f Fl(the)i(constructor)h(can)e(b)q(e)g(called)g(with)f(one)h
(argumen)o(t)257 1875 y Fk(a)22 b(=)g(rand\(10\);)257
1925 y(y)g(=)g(interval\(a\);)257 2007 y Fl(or)14 b(t)o(w)o(o)g
(argumen)o(ts)257 2090 y Fk(a)22 b(=)g(zeros\(10,2\);)d(b)i(=)h
(ones\(10,2\);)257 2139 y(y)g(=)g(interval\(a,b\);)257
2222 y Fl(of)9 b(t)o(yp)q(e)h Fk(double)p Fl(.)16 b(The)10
b(\015oating)e(p)q(oin)o(t)h(input)h(is)f(tak)o(en)h(as)g(desired)g
(quan)o(tit)o(y)m(,)f(the)h(in)o(terv)n(al)257 2271 y
Fk(interval\(0.1\))15 b Fl(do)q(es)j(not)f(con)o(tain)g(the)g(true)h
(mathematical)c(v)n(alue)1435 2255 y Ff(1)p 1427 2262
34 2 v 1427 2286 a(10)1465 2271 y Fl(.)28 b(The)18 b(t)o(yp)q(es)257
2321 y Fk(complex)257 2403 y(>>)k(a)f(=)h(interval\(sqrt\(-1\))o(\))257
2453 y(???)g(Error)e(using)h(==>)g(interval/interval)257
2503 y(Complex)g(intervals)f(are)h(not)g(supported.)963
2628 y Fl(6)p eop
7 6 bop 257 262 a Fl(and)20 b Fk(sparse)f Fl(are)i(curren)o(tly)g(not)f
(supp)q(orted.)37 b(In)o(v)o(ok)o(ed)20 b(with)g(t)o(w)o(o)f(argumen)o
(ts,)i(the)257 311 y(constructor)16 b(handles)e(the)h(\014rst)f(one)g
(as)g(in\014m)o(um)d(and)j(the)g(second)h(one)f(as)g(suprem)o(um)257
389 y Fk(>>)22 b(a)f(=)h(interval\([1)d(3],[2)i(4]\))257
439 y(a)h(=)257 488 y([1,2][3,4])257 566 y Fl(and)14
b(displa)o(ys)f(a)h(matrix)e(of)h(equal)h(dimensions)e(with)i(brac)o(k)
o(ets)h(around)f(eac)o(h)g(en)o(try)m(.)320 616 y(If)f(the)i
(dimensions)d(of)i(the)g(input)g(argumen)o(ts)f(mismatc)o(h)257
693 y Fk(>>)22 b(a)f(=)h(interval\(zeros\(2,)o(3\),on)o(es\(2,)o(4\)\))
257 743 y(???)g(Error)e(using)h(==>)g(interval/interval)257
793 y(Upper)g(and)g(lower)g(bound)g(must)g(have)g(the)g(same)g(size.)
257 870 y Fl(an)14 b(error)h(message)e(is)h(returned.)320
920 y(If)f(there)i(is)f(an)g(en)o(try)m(,)f(whose)i(in\014m)o(um)10
b(is)k(greater)h(than)f(the)g(suprem)o(um)257 998 y Fk(>>)22
b(a)f(=)h(interval\(1,-1\))257 1047 y(???)g(Error)e(using)h(==>)g
(interval/interval)257 1097 y(Upper)g(bound)g(must)g(be)g(greater)g
(than)g(lower)f(bound.)257 1175 y Fl(another)15 b(error)g(message)e(is)
h(returned.)320 1225 y(In)o(terv)n(als)f(including)g(NaN's,)h(plus/min)
o(us)e(in\014nit)o(y)h(and)g(the)i(empt)o(y)e(set)257
1302 y Fk(>>)22 b(1/interval\(-1,1\))257 1352 y(ans)g(=)257
1402 y([-Inf,Inf])257 1451 y(>>)g(interval\(-1,1\)/i)o(nterv)o(al\(-1)o
(,1\))257 1501 y(ans)g(=)257 1551 y([NaN,NaN])257 1601
y(>>)g(interval\([]\))257 1651 y(ans)g(=)257 1701 y({})257
1778 y Fl(are)15 b(part)f(of)i Fk(b4m)p Fl(.)320 1828
y(The)j(storage)h(of)e(matrices)h(of)f(t)o(yp)q(e)i Fk(interval)d
Fl(is)i(the)h(transp)q(ose)g(BIAS)g(storage)257 1878
y(and)14 b(b)q(oth)g(the)g(constructor)h(and)e(the)i(command)10
b(windo)o(w)j(displa)o(y)g(dep)q(end)i(v)o(ery)f(m)o(uc)o(h)257
1927 y(on)j(the)h(storage.)28 b(Therefore)18 b(these)g(\014les)g
(should)e(not)h(b)q(e)h(altered)g(without)e(making)f(a)257
1977 y(bac)o(kup.)257 2113 y Fj(5)67 b(Ov)n(erloaded)23
b(arithmetic)i(op)r(erators)257 2204 y Fl(Arithmetic)13
b(op)q(erators)i(whic)o(h)f(are)g(part)g(of)j Fh(Ma)m(tlab)e
Fl(for)e(the)i(datat)o(yp)q(e)f Fk(double)f Fl(ha)o(v)o(e)257
2254 y(b)q(een)k(o)o(v)o(erloaded)d(for)h(the)h(t)o(yp)q(e)g
Fk(interval)p Fl(.)k(The)15 b(b)q(eha)o(viour)g(of)g(the)g(routines)h
(for)f(the)257 2304 y(datat)o(yp)q(e)21 b Fk(interval)e
Fl(is)h(merely)g(the)h(same)f(as)h(the)g(b)q(eha)o(viour)f(of)g(the)h
(appropriate)257 2354 y(routine)g(for)f(the)h(datat)o(yp)q(e)f
Fk(double)p Fl(,)g(at)g(least)h(on)f(the)h(logical)d(and)i(error)i
(handling)257 2403 y(lev)o(el.)c(The)c(implemen)o(tation)d(issues)k
(di\013er)f(in)g(some)f(cases)i(v)o(ery)f(m)o(uc)o(h.)j(Some)c(asp)q
(ects)257 2453 y(included)h(in)g Fh(Ma)m(tlab)h Fl(for)e(argumen)o(ts)g
(of)g(t)o(yp)q(e)h Fk(double)f Fl(are)h(not)g(y)o(et)g(implemen)o(ted)d
(or)257 2503 y(will)i(nev)o(er)i(b)q(e)f(implemen)o(ted)e(for)h
(argumen)o(ts)g(of)h(t
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -