Commit 7bd874638204421dc61ac002be17f2203bd3efc3
1 parent
c4b4eae8c4
Exists in
master
allanplot.m: add save option
Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff
allanplot.m
| ... | ... | @@ -15,12 +15,16 @@ |
| 15 | 15 | # 1 drift removed ad |
| 16 | 16 | # 2 relative ad |
| 17 | 17 | # 3 relative drift removed ad |
| 18 | +# arg_save : [int] save adev with one file per column : | |
| 19 | +# 0 without save | |
| 20 | +# 1 save adev result to file-col.sig | |
| 18 | 21 | |
| 19 | 22 | filename = argv(){1}; |
| 20 | 23 | col = eval(argv(){2}); |
| 21 | 24 | fs = eval(argv(){3}); |
| 22 | 25 | mult = eval(argv(){4}); |
| 23 | 26 | ad_opt = eval(argv(){5}); |
| 27 | +arg_save = eval(argv(){6}); | |
| 24 | 28 | |
| 25 | 29 | if length(col) == length(mult) |
| 26 | 30 | figure |
| ... | ... | @@ -47,6 +51,11 @@ |
| 47 | 51 | leg{i} = strcat(filename, ' col', num2str(col(i))); |
| 48 | 52 | axis(10.^ceil(log10([tau(1), tau(end)]))) |
| 49 | 53 | hold on |
| 54 | + if arg_save ==1 | |
| 55 | + filenameout = strcat(strsplit(filename,'.'){1},'-',num2str(col(i)),'.sig') | |
| 56 | + datatosave = horzcat(tau', ad', err'); | |
| 57 | + save('-ascii', filenameout , 'datatosave'); | |
| 58 | + end | |
| 50 | 59 | end |
| 51 | 60 | legend(leg) |
| 52 | 61 | input("Press to continue..."); |