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 @ 33:161913b595ae

History | View | Annotate | Download (1.31 KB)

1 33:161913b595ae rmeddis
function profile2mFile(longTone, shortTone, gaps, BFs, TMC, offBFs, ...
2
    IFMCs, mFileName)
3
4
St = ['function x = ' mFileName ];
5
fid = fopen([mFileName '.m'],'w');
6
fprintf(fid, '%s\n', St);
7
8
St = ['x.BFs = [' num2str(BFs) '];' ];
9
fprintf(fid, '%s\n', St);
10
11
St = ['x.LongTone = [' num2str(longTone',3) '];' ];
12
fprintf(fid, '%s\n', St);
13
14
St = ['x.ShortTone = [' num2str(shortTone',3) '];' ];
15
fprintf(fid, '%s\n', St);
16
17
St = ['x.Gaps = [' num2str(gaps',3) '];' ];
18
fprintf(fid, '%s\n', St);
19
20
TMCFreq = BFs;
21
St = ['x.TMCFreq = [' num2str(TMCFreq) '];' ];
22
fprintf(fid, '%s\n', St);
23
24
fprintf(fid, '%s\t', 'x.TMC = [');
25
for i = 1:size(TMC,1),
26
    for j = 1:size(TMC,2),
27
        St = [num2str(TMC(i,j),3)];
28
        fprintf(fid, '%s\t', St);
29
    end
30
    fprintf(fid,'%s\n',' ');
31
end
32
fprintf(fid,'%s\n','];');
33
34
St = ['x.TMC = x.TMC'';' ];
35
fprintf(fid, '%s\n', St);
36
37
St = ['x.MaskerRatio = [' num2str(offBFs',2) '];' ];
38
fprintf(fid, '%s\n', St);
39
40
IFMCFreq = BFs;
41
St = ['x.IFMCFreq = [' num2str(IFMCFreq) '];' ];
42
fprintf(fid, '%s\n', St);
43
44
fprintf(fid, '%s\t', 'x.IFMCs = [');
45
for i = 1:size(IFMCs,1),
46
    for j = 1:size(IFMCs,2),
47
        St = [num2str(IFMCs(i,j),3)];
48
        fprintf(fid, '%s\t', St);
49
    end
50
    fprintf(fid,'%s\n',' ');
51
end
52
fprintf(fid,'%s\n','];');
53
54
St = ['x.IFMCs = x.IFMCs'';' ];
55
fprintf(fid, '%s\n', St);
56
57
fclose(fid);
58
59
60
61
62
63
64