To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at git://github.com/rmeddis/MAP.git .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Revision:

root / multithreshold 1.46 / profile2mFile.m @ 38:c2204b18f4a2

History | View | Annotate | Download (1.41 KB)

1
function profile2mFile(longTone, shortTone, gaps, BFs, TMC, offBFs, ...
2
    IFMCs, mFileName)
3

    
4
St = ['function x = ' mFileName ];
5
fid = fopen(['..' filesep 'profiles' filesep mFileName '.m'],'w');
6
fprintf(fid, '%s\n', St);
7

    
8
St = ['%created: ' UTIL_timeStamp];
9
fprintf(fid, '%s\n\n', St);
10

    
11
St = ['x.BFs = [' num2str(BFs) '];' ];
12
fprintf(fid, '%s\n\n', St);
13

    
14
St = ['x.LongTone = [' num2str(longTone',3) '];' ];
15
fprintf(fid, '%s\n', St);
16

    
17
St = ['x.ShortTone = [' num2str(shortTone',3) '];' ];
18
fprintf(fid, '%s\n\n', St);
19

    
20
St = ['x.Gaps = [' num2str(gaps',3) '];' ];
21
fprintf(fid, '%s\n', St);
22

    
23
TMCFreq = BFs;
24
St = ['x.TMCFreq = [' num2str(TMCFreq) '];' ];
25
fprintf(fid, '%s\n', St);
26

    
27
fprintf(fid, '%s\n', 'x.TMC = [');
28
for i = 1:size(TMC,1),
29
    for j = 1:size(TMC,2),
30
        St = [num2str(TMC(i,j),3)];
31
        fprintf(fid, '%s\t', St);
32
    end
33
    fprintf(fid,'%s\n',' ');
34
end
35
fprintf(fid,'%s\n','];');
36

    
37
St = ['x.TMC = x.TMC'';' ];
38
fprintf(fid, '%s\n\n', St);
39

    
40
St = ['x.MaskerRatio = [' num2str(offBFs',2) '];' ];
41
fprintf(fid, '%s\n', St);
42

    
43
IFMCFreq = BFs;
44
St = ['x.IFMCFreq = [' num2str(IFMCFreq) '];' ];
45
fprintf(fid, '%s\n', St);
46

    
47
fprintf(fid, '%s\n', 'x.IFMCs = [');
48
for i = 1:size(IFMCs,1),
49
    for j = 1:size(IFMCs,2),
50
        St = [num2str(IFMCs(i,j),3)];
51
        fprintf(fid, '%s\t', St);
52
    end
53
    fprintf(fid,'%s\n',' ');
54
end
55
fprintf(fid,'%s\n','];');
56

    
57
St = ['x.IFMCs = x.IFMCs'';' ];
58
fprintf(fid, '%s\n', St);
59

    
60
fclose(fid);
61

    
62

    
63

    
64

    
65

    
66

    
67

    
68