source: altifloat/matlab_toolbox/newtwin5f.m @ 160

Last change on this file since 160 was 129, checked in by jbrlod, 10 years ago

last version of Varanth

  • Property svn:executable set to *
File size: 11.7 KB
Line 
1
2% 1 floater 2 pts
3
4close all
5
6figure(1)
7
8ls;
9load obs_float/obs_float_test.dat;
10whos;
11obs_float_test (1:4,:)
12x=obs_float_test (1:2:350,4)
13y=obs_float_test (2:2:350,4)
14x=x+1
15y=y+1
16plot(x(1),y(1),'+')
17hold on;
18plot(x(175),y(175),'>')
19hold on;
20plot(x(1:175),y(1:175),'+');
21hold on;
22plot(x(1:175),y(1:175),'-r')
23hold on;
24
25
26x3=obs_float_test (351:2:700,4)
27y3=obs_float_test (352:2:700,4)
28x3=x3+1
29y3=y3+1
30plot(x3(1),y3(1),'+')
31hold on;
32plot(x3(175),y3(175),'>')
33hold on;
34plot(x3(1:175),y3(1:175),'+');
35hold on;
36plot(x3(1:175),y3(1:175),'-r')
37hold on;
38
39x5=obs_float_test (701:2:1050,4)
40y5=obs_float_test (702:2:1050,4)
41x5=x5+1
42y5=y5+1
43plot(x5(1),y5(1),'+')
44hold on;
45plot(x5(175),y5(175),'>')
46hold on;
47plot(x5(1:175),y5(1:175),'+');
48hold on;
49plot(x5(1:175),y5(1:175),'-r')
50hold on;
51
52x7=obs_float_test (1051:2:1400,4)
53y7=obs_float_test (1052:2:1400,4)
54x7=x7+1
55y7=y7+1
56plot(x7(1),y7(1),'+')
57hold on;
58plot(x7(175),y7(175),'>')
59hold on;
60plot(x7(1:175),y7(1:175),'+');
61hold on;
62plot(x7(1:175),y7(1:175),'-r')
63hold on;
64
65x9=obs_float_test (1401:2:1750,4)
66y9=obs_float_test (1402:2:1750,4)
67x9=x9+1
68y9=y9+1
69plot(x9(1),y9(1),'+')
70hold on;
71plot(x9(175),y9(175),'>')
72hold on;
73plot(x9(1:175),y9(1:175),'+');
74hold on;
75plot(x9(1:175),y9(1:175),'-r')
76hold on;
77
78load obs_float/rfloat_total.dat
79rfloat_total(:,:)
80x2=rfloat_total(1:145,4)
81y2=rfloat_total(1:145,3)
82ligne=1;
83for h=1:36:144
84    x2(h)=obs_float_test(ligne,4);
85    y2(h)=obs_float_test(ligne+1,4);
86    ligne=ligne+72;
87end
88x2=x2+1
89y2=y2+1
90
91[k,h]=size(x2);
92plot(x2(1),y2(1),'+')
93hold on;
94plot(x2(k-1),y2(k-1),'>')
95hold on;
96plot(x2(1:k-1),y2(1:k-1),'+')
97hold on;
98plot(x2(1:k-1),y2(1:k-1),'-g')
99hold on;
100
101rfloat_total(:,:)
102x4=rfloat_total(176:320,4)
103y4=rfloat_total(176:320,3)
104ligne=351;
105for h=1:36:144
106    x4(h)=obs_float_test(ligne,4);
107    y4(h)=obs_float_test(ligne+1,4);
108    ligne=ligne+72;
109end
110x4=x4+1
111y4=y4+1
112[k,h]=size(x4);
113plot(x4(1),y4(1),'+')
114hold on;
115plot(x4(k-1),y4(k-1),'>')
116hold on;
117plot(x4(1:k-1),y4(1:k-1),'+')
118hold on;
119plot(x4(1:k-1),y4(1:k-1),'-g')
120hold on;
121
122rfloat_total(:,:)
123x6=rfloat_total(351:495,4)
124y6=rfloat_total(351:495,3)
125ligne=701;
126for h=1:36:144
127    x6(h)=obs_float_test(ligne,4);
128    y6(h)=obs_float_test(ligne+1,4);
129    ligne=ligne+72;
130end
131x6=x6+1
132y6=y6+1
133[k,h]=size(x6);
134plot(x6(1),y6(1),'+')
135hold on;
136plot(x6(k-1),y6(k-1),'>')
137hold on;
138plot(x6(1:k-1),y6(1:k-1),'+')
139hold on
140plot(x6(1:k-1),y6(1:k-1),'-g')
141hold on;
142
143rfloat_total(:,:)
144x8=rfloat_total(526:670,4)
145y8=rfloat_total(526:670,3)
146ligne=1051;
147for h=1:36:144
148    x8(h)=obs_float_test(ligne,4);
149    y8(h)=obs_float_test(ligne+1,4);
150    ligne=ligne+72;
151end
152x8=x8+1
153y8=y8+1
154[k,h]=size(x8);
155plot(x8(1),y8(1),'+')
156hold on;
157plot(x8(k-1),y8(k-1),'>')
158hold on;
159plot(x8(1:k-1),y8(1:k-1),'+')
160hold on;
161plot(x8(1:k-1),y8(1:k-1),'-g')
162hold on;
163
164rfloat_total(:,:)
165x10=rfloat_total(701:845,4)
166y10=rfloat_total(701:845,3)
167ligne=1401;
168for h=1:36:144
169    x10(h)=obs_float_test(ligne,4);
170    y10(h)=obs_float_test(ligne+1,4);
171    ligne=ligne+72;
172end
173x10=x10+1
174y10=y10+1
175[k,h]=size(x10);
176plot(x10(1),y10(1),'+')
177hold on;
178plot(x10(k-1),y10(k-1),'>')
179hold on;
180plot(x10(1:k-1),y10(1:k-1),'+')
181hold on;
182plot(x10(1:k-1),y10(1:k-1),'-g')
183hold on;
184
185%
186% load obs_float/uv_total.dat;
187% whos;
188% X1=uv_total(1:5046,end-3);
189% Y1=uv_total(1:5046,end-2);
190% X1=X1+1;
191% Y1=Y1+1;
192% %change si pas de temps change
193% U1=zeros(5046,1);
194% V1=zeros(5046,1);
195% e=1;
196% for r=1:1:140
197%     
198%     Unew=zeros(1,5046);
199%     Vnew=zeros(1,5046);
200%     for count=1:5046
201%         Unew(count)=uv_total(e,end-1);
202%         Vnew(count)=uv_total(e,end);
203%         e=e+1;
204%     end
205%     U1=U1+Unew';
206%     V1=V1+Vnew';
207%   
208%     
209% end
210%
211% U1=U1./140;
212% V1=V1./140;
213% quiver(X1,Y1,U1,V1,2,'r','Autoscale','off');
214%
215% load obs_float/unext3d.dat;
216%
217% unext3d=roundn(unext3d,-6)
218% whos;
219% X3=unext3d(:,end-2);
220% Y3=unext3d(:,end-1);
221% U3=unext3d(:,end);
222% load obs_float/vnext3d.dat
223% vnext3d=roundn(vnext3d,-6)
224% V3=vnext3d(:,end);
225% quiver(X3,Y3,U3,V3,2,'b','Autoscale','off');
226%
227% load obs_float/uzero.dat;
228%
229%
230% whos;
231% X2=uzero(:,end-2);
232% Y2=uzero(:,end-1);
233% U2=uzero(:,end);
234% load obs_float/vzero.dat
235%
236% V2=vzero(:,end);
237% quiver(X2,Y2,U2,V2,2,'g','Autoscale','off');
238%
239%
240%
241%
242%
243%  figure(2)
244% load obs_float/vel_bck_all.dat
245% it=find(vel_bck_all(:,1)==1);
246% Tu=reshape(vel_bck_all(it,4),58,87);
247% Tv=reshape(vel_bck_all(it,5),58,87);
248%
249% load obs_float/vel_next_all.dat
250% it=find(vel_next_all(:,1)==1);
251% Bu=reshape(vel_next_all(it,4),58,87);
252% Bv=reshape(vel_next_all(it,5),58,87);
253%
254% F=(Bu-Tu).^2+(Bv-Tv).^2
255% imagesc(F)
256% axis xy
257% colorbar
258% hold on
259% obs_float_test (1:4,:)
260% x=obs_float_test (1:2:350,4)
261% y=obs_float_test (2:2:350,4)
262% x=x+1
263% y=y+1
264% plot(x(1),y(1),'+')
265% hold on;
266% plot(x(175),y(175),'>')
267% hold on;
268% plot(x(1:175),y(1:175),'+');
269% hold on;
270% plot(x(1:175),y(1:175),'-r')
271% hold on;
272%
273%
274% x3=obs_float_test (351:2:700,4)
275% y3=obs_float_test (352:2:700,4)
276% x3=x3+1
277% y3=y3+1
278% plot(x3(1),y3(1),'+')
279% hold on;
280% plot(x3(175),y3(175),'>')
281% hold on;
282% plot(x3(1:175),y3(1:175),'+');
283% hold on;
284% plot(x3(1:175),y3(1:175),'-r')
285% hold on;
286%
287% x5=obs_float_test (701:2:1050,4)
288% y5=obs_float_test (702:2:1050,4)
289% x5=x5+1
290% y5=y5+1
291% plot(x5(1),y5(1),'+')
292% hold on;
293% plot(x5(175),y5(175),'>')
294% hold on;
295% plot(x5(1:175),y5(1:175),'+');
296% hold on;
297% plot(x5(1:175),y5(1:175),'-r')
298% hold on;
299%
300% x7=obs_float_test (1051:2:1400,4)
301% y7=obs_float_test (1052:2:1400,4)
302% x7=x7+1
303% y7=y7+1
304% plot(x7(1),y7(1),'+')
305% hold on;
306% plot(x7(175),y7(175),'>')
307% hold on;
308% plot(x7(1:175),y7(1:175),'+');
309% hold on;
310% plot(x7(1:175),y7(1:175),'-r')
311% hold on;
312%
313% x9=obs_float_test (1401:2:1750,4)
314% y9=obs_float_test (1402:2:1750,4)
315% x9=x9+1
316% y9=y9+1
317% plot(x9(1),y9(1),'+')
318% hold on;
319% plot(x9(175),y9(175),'>')
320% hold on;
321% plot(x9(1:175),y9(1:175),'+');
322% hold on;
323% plot(x9(1:175),y9(1:175),'-r')
324% hold on;
325% figure(3)
326%
327% load obs_float/uv_total.dat
328%
329% steps=35
330% counterr=1;
331%
332% Cu=0;
333% Cv=0;
334% for ll=1:steps
335%     Iu=0;
336%     Iv=0;
337%     it=counterr:(counterr+5045);
338%     Iu=reshape(uv_total(it,4),58,87);
339%     Iv=reshape(uv_total(it,5),58,87);
340%     counterr=counterr+5046;
341%     Cu=Cu+Iu;
342%     Cv=Cv+Iv;
343% end
344%     
345% Cu=Cu/35;
346% Cv=Cv/35;
347%
348% F1=(Tu-Cu).^2+(Tv-Cv).^2;
349% imagesc(F1)
350% axis xy
351% colorbar
352% hold on
353% obs_float_test (1:4,:)
354% x=obs_float_test (1:2:350,4)
355% y=obs_float_test (2:2:350,4)
356% x=x+1
357% y=y+1
358% plot(x(1),y(1),'+')
359% hold on;
360% plot(x(175),y(175),'>')
361% hold on;
362% plot(x(1:175),y(1:175),'+');
363% hold on;
364% plot(x(1:175),y(1:175),'-r')
365% hold on;
366%
367%
368% x3=obs_float_test (351:2:700,4)
369% y3=obs_float_test (352:2:700,4)
370% x3=x3+1
371% y3=y3+1
372% plot(x3(1),y3(1),'+')
373% hold on;
374% plot(x3(175),y3(175),'>')
375% hold on;
376% plot(x3(1:175),y3(1:175),'+');
377% hold on;
378% plot(x3(1:175),y3(1:175),'-r')
379% hold on;
380%
381% x5=obs_float_test (701:2:1050,4)
382% y5=obs_float_test (702:2:1050,4)
383% x5=x5+1
384% y5=y5+1
385% plot(x5(1),y5(1),'+')
386% hold on;
387% plot(x5(175),y5(175),'>')
388% hold on;
389% plot(x5(1:175),y5(1:175),'+');
390% hold on;
391% plot(x5(1:175),y5(1:175),'-r')
392% hold on;
393%
394% x7=obs_float_test (1051:2:1400,4)
395% y7=obs_float_test (1052:2:1400,4)
396% x7=x7+1
397% y7=y7+1
398% plot(x7(1),y7(1),'+')
399% hold on;
400% plot(x7(175),y7(175),'>')
401% hold on;
402% plot(x7(1:175),y7(1:175),'+');
403% hold on;
404% plot(x7(1:175),y7(1:175),'-r')
405% hold on;
406%
407% x9=obs_float_test (1401:2:1750,4)
408% y9=obs_float_test (1402:2:1750,4)
409% x9=x9+1
410% y9=y9+1
411% plot(x9(1),y9(1),'+')
412% hold on;
413% plot(x9(175),y9(175),'>')
414% hold on;
415% plot(x9(1:175),y9(1:175),'+');
416% hold on;
417% plot(x9(1:175),y9(1:175),'-r')
418% hold on;
419% F2=(Bu-Cu).^2+(Bv-Cv).^2;
420% figure(4)
421% imagesc(F2)
422% axis xy
423% colorbar
424% hold on
425% obs_float_test (1:4,:)
426% x=obs_float_test (1:2:350,4)
427% y=obs_float_test (2:2:350,4)
428% x=x+1
429% y=y+1
430% plot(x(1),y(1),'+')
431% hold on;
432% plot(x(175),y(175),'>')
433% hold on;
434% plot(x(1:175),y(1:175),'+');
435% hold on;
436% plot(x(1:175),y(1:175),'-r')
437% hold on;
438%
439%
440% x3=obs_float_test (351:2:700,4)
441% y3=obs_float_test (352:2:700,4)
442% x3=x3+1
443% y3=y3+1
444% plot(x3(1),y3(1),'+')
445% hold on;
446% plot(x3(175),y3(175),'>')
447% hold on;
448% plot(x3(1:175),y3(1:175),'+');
449% hold on;
450% plot(x3(1:175),y3(1:175),'-r')
451% hold on;
452%
453% x5=obs_float_test (701:2:1050,4)
454% y5=obs_float_test (702:2:1050,4)
455% x5=x5+1
456% y5=y5+1
457% plot(x5(1),y5(1),'+')
458% hold on;
459% plot(x5(175),y5(175),'>')
460% hold on;
461% plot(x5(1:175),y5(1:175),'+');
462% hold on;
463% plot(x5(1:175),y5(1:175),'-r')
464% hold on;
465%
466% x7=obs_float_test (1051:2:1400,4)
467% y7=obs_float_test (1052:2:1400,4)
468% x7=x7+1
469% y7=y7+1
470% plot(x7(1),y7(1),'+')
471% hold on;
472% plot(x7(175),y7(175),'>')
473% hold on;
474% plot(x7(1:175),y7(1:175),'+');
475% hold on;
476% plot(x7(1:175),y7(1:175),'-r')
477% hold on;
478%
479% x9=obs_float_test (1401:2:1750,4)
480% y9=obs_float_test (1402:2:1750,4)
481% x9=x9+1
482% y9=y9+1
483% plot(x9(1),y9(1),'+')
484% hold on;
485% plot(x9(175),y9(175),'>')
486% hold on;
487% plot(x9(1:175),y9(1:175),'+');
488% hold on;
489% plot(x9(1:175),y9(1:175),'-r')
490% hold on;
491% figure (5)
492% imagesc(F)
493% axis([71 77 33 37])
494% hold on
495% obs_float_test (1:4,:)
496% x=obs_float_test (1:2:350,4)
497% y=obs_float_test (2:2:350,4)
498% x=x+1
499% y=y+1
500% plot(x(1),y(1),'+')
501% hold on;
502% plot(x(175),y(175),'>')
503% hold on;
504% plot(x(1:175),y(1:175),'+');
505% hold on;
506% plot(x(1:175),y(1:175),'-r')
507% hold on;
508%
509%
510% x3=obs_float_test (351:2:700,4)
511% y3=obs_float_test (352:2:700,4)
512% x3=x3+1
513% y3=y3+1
514% plot(x3(1),y3(1),'+')
515% hold on;
516% plot(x3(175),y3(175),'>')
517% hold on;
518% plot(x3(1:175),y3(1:175),'+');
519% hold on;
520% plot(x3(1:175),y3(1:175),'-r')
521% hold on;
522%
523% x5=obs_float_test (701:2:1050,4)
524% y5=obs_float_test (702:2:1050,4)
525% x5=x5+1
526% y5=y5+1
527% plot(x5(1),y5(1),'+')
528% hold on;
529% plot(x5(175),y5(175),'>')
530% hold on;
531% plot(x5(1:175),y5(1:175),'+');
532% hold on;
533% plot(x5(1:175),y5(1:175),'-r')
534% hold on;
535%
536% x7=obs_float_test (1051:2:1400,4)
537% y7=obs_float_test (1052:2:1400,4)
538% x7=x7+1
539% y7=y7+1
540% plot(x7(1),y7(1),'+')
541% hold on;
542% plot(x7(175),y7(175),'>')
543% hold on;
544% plot(x7(1:175),y7(1:175),'+');
545% hold on;
546% plot(x7(1:175),y7(1:175),'-r')
547% hold on;
548%
549% x9=obs_float_test (1401:2:1750,4)
550% y9=obs_float_test (1402:2:1750,4)
551% x9=x9+1
552% y9=y9+1
553% plot(x9(1),y9(1),'+')
554% hold on;
555% plot(x9(175),y9(175),'>')
556% hold on;
557% plot(x9(1:175),y9(1:175),'+');
558% hold on;
559% plot(x9(1:175),y9(1:175),'-r')
560% hold on;
561% figure (6)
562% imagesc(F1)
563%
564% axis([71 77 33 37])
565% hold on
566% obs_float_test (1:4,:)
567% obs_float_test (1:4,:)
568% x=obs_float_test (1:2:350,4)
569% y=obs_float_test (2:2:350,4)
570% x=x+1
571% y=y+1
572% plot(x(1),y(1),'+')
573% hold on;
574% plot(x(175),y(175),'>')
575% hold on;
576% plot(x(1:175),y(1:175),'+');
577% hold on;
578% plot(x(1:175),y(1:175),'-r')
579% hold on;
580%
581%
582% x3=obs_float_test (351:2:700,4)
583% y3=obs_float_test (352:2:700,4)
584% x3=x3+1
585% y3=y3+1
586% plot(x3(1),y3(1),'+')
587% hold on;
588% plot(x3(175),y3(175),'>')
589% hold on;
590% plot(x3(1:175),y3(1:175),'+');
591% hold on;
592% plot(x3(1:175),y3(1:175),'-r')
593% hold on;
594%
595% x5=obs_float_test (701:2:1050,4)
596% y5=obs_float_test (702:2:1050,4)
597% x5=x5+1
598% y5=y5+1
599% plot(x5(1),y5(1),'+')
600% hold on;
601% plot(x5(175),y5(175),'>')
602% hold on;
603% plot(x5(1:175),y5(1:175),'+');
604% hold on;
605% plot(x5(1:175),y5(1:175),'-r')
606% hold on;
607%
608% x7=obs_float_test (1051:2:1400,4)
609% y7=obs_float_test (1052:2:1400,4)
610% x7=x7+1
611% y7=y7+1
612% plot(x7(1),y7(1),'+')
613% hold on;
614% plot(x7(175),y7(175),'>')
615% hold on;
616% plot(x7(1:175),y7(1:175),'+');
617% hold on;
618% plot(x7(1:175),y7(1:175),'-r')
619% hold on;
620%
621% x9=obs_float_test (1401:2:1750,4)
622% y9=obs_float_test (1402:2:1750,4)
623% x9=x9+1
624% y9=y9+1
625% plot(x9(1),y9(1),'+')
626% hold on;
627% plot(x9(175),y9(175),'>')
628% hold on;
629% plot(x9(1:175),y9(1:175),'+');
630% hold on;
631% plot(x9(1:175),y9(1:175),'-r')
632% hold on;
633% sum=0;
634% count=0;
635% for r=71:76
636%     for t=33:37
637%         sum=sum+F(t,r);
638%         count=count+1;
639%     end
640% end
641% sum=sum/count
642%
643% sum3=0;
644% count3=0;
645% for r=71:76
646%     for t=33:37
647%         sum3=sum3+F1(t,r);
648%         count3=count3+1;
649%     end
650% end
651% sum3=sum3/count3
652% sum=sqrt(sum/count);
653% sum3=sqrt(sum3/count3);
654% errorbefore=sum
655% errorafter=sum3
Note: See TracBrowser for help on using the repository browser.