1227

Download as pdf
Download as pdf
You are on page 1of 14
Ax =
inconsistent geet (| +) 2 argmin Elly = avgnin([5x t]oy-2\Jo OF 2 5 i 27 _ oO Le orgmall Ell, = again [ots (ray) = ote ee ae ovyinin NElljs = argan{Moy( 0 Hs) Busy: x — _ asd |) a Use Ly norm te Sind Sparce Solutio» : 2» E= \? ‘ ? f= Fa [ v 2.5,, Compressed Sensing foo feast ) : Ks FF SEs [Jo Use La norm eo deal with Gow spon ‘ Noise eee [re] => Use Lio norm bo egualive a error Componerts A(T] oe( 8) Wally = [I (Wan, = 12 \WAll, 2 Fro1 yall,= Jae WAllo= 12 ill, = 6 Linear Combination : 3 \ fee[! olelt* le [Efst-[i]=tsr-i0” well a a K= cogil . e~ [ie [t] E,A¥= o | i 1 el (ay) ce, =? 12) Sint ( p¥s-b) ~° ae (4) We ats KEM? ete #3 CATR BBD = 03 ale |elo mf] no Raw hee OO i ¥y7 S4y ~~ prawns ch Ex + Ax (pH) Ep 20 =| Max = ATL Ex= Ab-b 1 Ax# > bla a s (I Aue Yo. b i 2 \e GUL Ye y ce cs fn) au G ) b at i (pr bh bith = \P > b- bebe ? Aik “ age MRED a Vv ATA pe mb TRA 2 ATh rn > AAG ZA Ax 4h E=Axt-b : , Xf x Fpaflelly = CAx-b) CA-4) x = (KARL) (Arb) vtooz [ee 0 y400 |= o | =» NAG KL : 0 yIwW Jn tT4 Ay=b Fitting model to data L Lu Lu 2a z oF El], = e+ @2 + % 2 ] [13-(etary) ¥ [18-(a0t28] + [34 = (et 3a))” ()= argminfelle allel. - ‘ Goa) | oa. => [ Wells, jel. ooo aa [13 fae 4a0)) - Cie ta. trad) C4 - (4s t3a,)) =2 | ( y-teetay) 2 CER) 3 [34> (ae¥3a,)J=0 * Fitting model to data ¢,=13-(a, +14) e, =18-(a, +2a,) e, =34-(a, +3a,) a _ I t R etter [LS (8) Oe +34, = 34 * Example 4.4 Find the best line and best parabola for the four data points (-1,1), (0,0), (1,0), (2,-1) ye he* OX YZ et BX Ga x” == oe _ —_ a " aa 5 — vos As L425 KS At aK ee a x Sade Yo pf typsy. [ean 1.0000 4.333945 po? pea ey 270000) 1.00412. 23 io : 3.0000 4.3622 5 4.0000 4.3188. xhat = 5.0000 3.1923 « 6.0000 4.5664. 7.0000 5.8426 1.9891 8.0000 9.5784 . 9,000 9.2694 0.5911 10.0000 5.6501 1. Form the normal equations, and compute the least squares solution and 2-norm error for the 42.30 10 231 1 ||. o 13-4 2]/"@]=} 2 ro 1} 3 0 31 3 -2jt™ 5 time of day y= eek wl + | emp ©) o| -22 s| -28 1 4] -61 i] -39 4] 00 3 Ll 3] -06 z| -tt Cos(ot &) y ~ AS CS > - Sny Sin st oF -s| ~My Os 1 t Ca CCs(ant £ OH G+ Gestas ents Osby Co + C, CoS (ant) + Cy Sin(an +) : Ge Gi cos @ | cos() 1 c03(22) os) 1 1 ! ' J b> A'*A ans = 8.0000 — -0.0000 -0.0000 4.0000 0 0.0000 Ca=-G'6rap Sin) : — * 1 c05(24) snete) 4 IN _A nN get $ > o (@") «(an a o ¢ Pe é -[0.24 oO °° 0 ans = 9.0000 -15.6000 4.0000 -2.9778 -10.2376 Axes , If yor Kno A iS om othe gona! matrix AAtzAt A'A= D >> t=(0:1/8:7/8); >> y=[-2.2;-2.8;-6.1;-3.95051.15-0.6;-1.1]; >> AC: L)=ones(8,1):AC: ,2)=cos(2*pi*t) AC, AC: ,4)=cos(2*2*pi*t);AC: ,5)=sin(2*2*pi*t); AC: ,6)=cos(3*2*pi*t)sA(: ,7)=sin(3*2*pi*t):AC: ,8)=cos(4*2*pi*t); >> chat=inv(A'*A)*A'*y =s in(2*pi*t); chat = 1.9500, -0.7445 +2.5594 ee 0.8250. -0.3555 0.1906, 0.2750 >> tt=linspace(0,1,1001); >> plot(t.y, ‘ob! , tt chat(1)4chat (2)*cos(2*pi*tt)+chat (3)*sin(2*pi*tt)+. . chat (4)*cos(2*2%pi*tt tchat (5)*sin(2*2"pi" tt + chat (6)*cos(3#2*pi* tt )tchat (7)*sin(3*2pi* tt )+ chat(8)*cos(4*2*pi*tt)) >» Fhe x Neue hsseoes-aoeeo

You might also like