亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? generatestats.m

?? 分析了ofdm系統的過程
?? M
?? 第 1 頁 / 共 2 頁
字號:
function stats = generateStats(dirName)
%generateReport Create a report for the given directory.
%
%   Example:
%     stats = generateStats(pwd);
%     metrics = computeMetrics(stats);
%     createReport(metrics,pwd)

% Pramod Kumar and Matthew Simoneau
% Copyright 2005-2006 The MathWorks, Inc.

% Get a listing of all files.
if ~isdir(dirName)
    error('"%s" is not a valid directory.',dirName);
end

% Get a listing of all the M-files, including subdirectories.
fileList = getFilenames(dirName);

% Since cloning is cross-file, compute this first.
cloneInfo = getCloneInfo(fileList,dirName);

% Now iterate over each file in fileList.
stats = struct('lines',{},'comments',{},'complexity',{},'help',{},'mlint',{},'clash',{},'clone',{});
for i = 1:size(fileList,2)
    file = fileList{i};
    stats(i,1).filename = removeBase(file,dirName);
    stats(i,1).name = hashFilename(file,dirName);
    [stats(i,1).lines,stats(i,1).comments] = getLineCounts(file);
    stats(i,1).complexity = cyclomaticComplexity(file);
    [stats(i,1).help,stats(i,1).helpmessages] = generatedHelpMetric(file);
    stats(i,1).mlintmessages = getMlintMessages(file);
    stats(i,1).mlint = numel(stats(i,1).mlintmessages);
    [stats(i,1).clash,stats(i,1).clashname] = getClash(file);
    cloneMatches = strmatch(stats(i,1).filename,{cloneInfo.file1},'exact');
    stats(i,1).clone = numel(cloneMatches);
    stats(i,1).cloneInfo = cloneInfo(cloneMatches);
end

%==========================================================================
function s = removeBase(s,base)
s = strrep(s,[base filesep],'');
s = strrep(s,filesep,'/');

%==========================================================================
function s = hashFilename(s,dirName)
s = strrep(s,[dirName filesep],'');
s = strrep(s,'\','_');

%==========================================================================
function filenames = getFilenames(root)
% getFilenames Returns all the M-files this directory and in subdirectories.

% Everything in this folder.
allFiles = dir([root filesep '*']);

% The files we need in this folder.
myFiles = dir([root filesep '*.m']);

% Build a list of all the files matching the regular expression in this folder.
filenames = {};
for k = 1:length(myFiles)
    filenames{k} = [root filesep myFiles(k).name];
end

% Do a recursive call of this function for every sub directory of this folder.
for k = 1:length(allFiles)
    if allFiles(k).isdir && ...
            ~strcmp(allFiles(k).name,'.') && ...
            ~strcmp(allFiles(k).name,'..')
        thisFolder = [root filesep allFiles(k).name];
        filenames = [filenames getFilenames(thisFolder)];
    end
end

%==========================================================================
function [lineCount,commentCount] = getLineCounts(filename)
% Returns the number of lines of code and comments in a file.

% Count code lines.  It does not include the lines of comments or blank
% lines. If a statement is continued on many lines it counts as only one
f = textread(filename,'%s','delimiter','\n','whitespace','','bufsize',4095*10);
[unused,bptok] = xmtok(f);
% The first line of code of a function is not counted in bptok
codeCount = sum(bptok)+1;

% Count comment lines.
percent = regexp(f, '\s*[%]','start', 'once');
linesWithPercent = sum(~cellfun('isempty',percent));
percentInQuotes = regexp(f, '''.*[%].*''','start', 'once');
linesWithPercentInQuotes = sum(~cellfun('isempty',percentInQuotes));
commentCount = linesWithPercent-linesWithPercentInQuotes;

% Sum for total.
lineCount = codeCount + commentCount;

%==========================================================================
function y = cyclomaticComplexity(fileName)
%CYCLOMATICCOMPLEXITY finds max Cyclomatic Complexity of functions in the file
%   y = CYCLOMATICCOMPLEXITY(myFile) calculates the cyclomatic complexity of
%   the function in "fileName". If the file has more than one function in
%   it then CYCLOMATICCOMPLEXITY calculates the cyclomatic complexity of
%   each function and reports the maximum
%
%   For example if you have 2 functions in the file with complexity of 7 and
%   9 this function will report a complexity value of 9

% Note that the "-cyc" flag is still undocumented and will change in a
% future release.
s = mlint('-cyc','-struct',fileName);

lfunctions = {};
lcomplexities = [];

p1 = 'The McCabe complexity of ''(\w+)'' is (\d+)\.';
p2 = 'The McCabe complexity is (\d+)\.';
for i = 1:length(s)
    m1 = regexp(s(i).message,p1,'tokens');
    m2 = regexp(s(i).message,p2,'tokens');
    if ~isempty(m1)
        lfunctions{end+1,1} = m1{1}{1};
        lcomplexities(end+1,1) = str2double(m1{1}{2});
    elseif ~isempty(m2)
        [unused,name,ext] = fileparts(fileName);
        lfunctions{end+1,1} = [name ext];
        lcomplexities(end+1,1) = str2double(m2{1}{1});        
    end
end

if isempty(lcomplexities)
    y = 0;
else
    y = max(lcomplexities);
end

%==========================================================================
function [metric,y] = generatedHelpMetric(fileName)
%This function generates a number for each file based on the help content
%of the file. H1, Help, and Example each could result in 1 warning. so if
%all three are missing 3 is returned. if two are missing 2 is returned etc.

temp = 0;
y = generateHelpInfo(fileName,0);
if(isempty(y.description))
    temp = temp+1;
end
if(isempty(y.example))
    temp = temp+1;
end
if(isempty(y.help))
    temp = temp+1;
end
metric = temp;

%==========================================================================
function helpInfo = generateHelpInfo(fileName, helpSubfunsDisplay)
%HELPRPT  Scan a file or directory for help.
strc = [];
if (helpSubfunsDisplay==1)
    callStrc = getcallinfo(fileName,'subfuns');
else
    callStrc = getcallinfo(fileName,'file');
end
for m = 1:length(callStrc)
    strc(end+1).filename = fileName;
    strc(end).name = callStrc(m).name;
    strc(end).type = callStrc(m).type;
    strc(end).firstLine = callStrc(m).firstline;
    if strcmp(strc(end).type,'subfunction')
        helpStr = helpfunc([strc(end).filename filemarker strc(end).name]);
    else
        helpStr = helpfunc(strc(end).filename);
    end
    strc(end).help = code2html(helpStr);
    % Remove any leading spaces and percent signs
    % Grab all the text up to the first carriage return
    helpTkn = regexp(helpStr,'^\s*%*\s*([^\n]*)\n','tokens','once');
    if isempty(helpTkn)
        strc(end).description = '';
    else
        strc(end).description = helpTkn{1};
    end
    % Now we grep through the function line by line looking for
    % copyright, example, and see-also information. Don't bother
    % looking for these things in a subfunction.
    % NOTE: This will not work for Japanese files
    if ~strcmp(strc(end).type,'subfunction')
        f = textread(fileName,'%s','delimiter','\n','whitespace','','bufsize',4095*10);
        strc(end).example = '';
        for i = 1:length(f)
            % The help report searches all comment lines in the file,
            % even if they occur after the typical "help block" at the
            % top of the file.
            % If there's no comment character, short circuit the loop.
            if isempty(strfind(f{i},'%'))
                continue
            end
            exTkn = regexpi(f{i},'^\s*%(\s*example)','tokens','once');
            if ~isempty(exTkn)
                exampleStr = {' ',exTkn{1}};
                strc(end).exampleLine = i;
                % Loop through and grep the entire example
                % We assume the example ends when there is a blank
                % line or when the comments end.
                exampleCompleteFlag = 0;
                for j = (i+1):length(f)
                    codeTkn = regexp(f{j},'^\s*%(\s*[^\s].*$)','tokens','once');
                    if isempty(codeTkn)
                        exampleCompleteFlag = 1;
                    else
                        exampleStr{end+1} = codeTkn{1};
                    end
                    if exampleCompleteFlag
                        break
                    end
                end
                strc(end).example = sprintf('%s\n',exampleStr{:});
            end
        end
    end
end
helpInfo= strc;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产最新精品精品你懂的| 激情久久久久久久久久久久久久久久| 日韩精品中午字幕| 日韩欧美一级片| 欧美在线观看一区二区| 亚洲国产毛片aaaaa无费看| 2021久久国产精品不只是精品| 国产精品影视天天线| 亚洲欧美国产77777| 7777精品伊人久久久大香线蕉| 久热成人在线视频| 国产精品色在线观看| 欧美精品v国产精品v日韩精品| 欧美综合亚洲图片综合区| 成人免费观看av| 韩日av一区二区| 亚洲成精国产精品女| 中文字幕一区二区三区色视频| 日韩午夜在线观看| 91福利社在线观看| 久色婷婷小香蕉久久| 久久久久久久综合| 欧美高清在线一区二区| 欧美在线观看视频一区二区| 国产精品一区在线观看你懂的| 亚洲线精品一区二区三区八戒| 日韩欧美色电影| 欧美综合一区二区| 欧美三级日韩三级| 国产毛片精品国产一区二区三区| 老司机精品视频在线| 婷婷综合另类小说色区| 亚洲成人在线免费| 亚洲黄网站在线观看| 国产精品久久久久四虎| 亚洲精品在线网站| 9l国产精品久久久久麻豆| 一区二区三区毛片| 亚洲天堂精品视频| 欧美一区二区三区日韩视频| 99r国产精品| 91影院在线免费观看| 国产亚洲一区二区三区| 一本大道久久精品懂色aⅴ| 欧美日韩国产美女| 久久色在线视频| 亚洲一区免费视频| 精品一区二区免费在线观看| 91一区一区三区| 欧美成人在线直播| 一区二区三区毛片| 国产精品自拍一区| 欧美精选在线播放| 久久久精品黄色| 视频在线观看一区| 成人一区二区三区视频在线观看 | 亚洲精品在线电影| 亚洲人成网站影音先锋播放| 日本欧美肥老太交大片| av网站免费线看精品| 日韩精品一区二区三区四区| 亚洲欧美成人一区二区三区| 国产一区二区三区四区五区美女| 在线欧美日韩精品| 国产欧美日韩麻豆91| 日韩高清不卡一区| 91同城在线观看| 久久美女艺术照精彩视频福利播放| 亚洲在线成人精品| 国产成人精品一区二区三区四区| 欧美日韩精品三区| 亚洲人妖av一区二区| 国产一区二区中文字幕| 7878成人国产在线观看| 亚洲一区二区在线视频| av中文字幕在线不卡| 久久婷婷一区二区三区| 首页综合国产亚洲丝袜| 91福利资源站| 亚洲欧美一区二区不卡| 粉嫩蜜臀av国产精品网站| 日韩美一区二区三区| 日韩精品每日更新| 欧美日韩你懂的| 亚洲午夜久久久久中文字幕久| 99久久精品国产网站| 国产日韩欧美精品在线| 国产在线麻豆精品观看| 日韩欧美色综合网站| 日本成人中文字幕在线视频| 视频一区国产视频| 国产美女在线观看一区| 欧美成人免费网站| 美女网站色91| 日韩一卡二卡三卡四卡| 奇米777欧美一区二区| 欧美精品视频www在线观看 | 亚洲成人中文在线| 色999日韩国产欧美一区二区| 中文字幕欧美国产| 国产99久久久久| 国产婷婷色一区二区三区四区| 国产一区二区三区四区五区美女 | 欧美日韩高清影院| 亚洲国产一区二区视频| 精品视频在线免费看| 伊人一区二区三区| 欧美日韩综合不卡| 日本欧美一区二区在线观看| 日韩欧美国产系列| 久久 天天综合| 亚洲精品一区二区精华| 国产精品1区2区3区在线观看| 久久新电视剧免费观看| 国产激情一区二区三区四区| 国产日韩综合av| 99国产精品国产精品久久| 亚洲综合自拍偷拍| 69av一区二区三区| 黑人精品欧美一区二区蜜桃| 国产亚洲精品aa午夜观看| www.亚洲人| 亚洲一区二区三区视频在线播放 | 欧美日本在线一区| 麻豆视频一区二区| 国产欧美视频在线观看| 91亚洲国产成人精品一区二三| 一个色妞综合视频在线观看| 欧美一区二区三区在线| 国产一区二区三区视频在线播放| 国产精品色哟哟网站| 欧美性极品少妇| 美女脱光内衣内裤视频久久影院| 国产亚洲制服色| 日本电影亚洲天堂一区| 日日骚欧美日韩| 国产偷国产偷精品高清尤物| 日本韩国欧美三级| 美女脱光内衣内裤视频久久影院| 国产欧美精品一区二区色综合| 色婷婷国产精品| 毛片av一区二区三区| 国产精品国产精品国产专区不片| 欧美系列日韩一区| 经典三级一区二区| 亚洲精品日韩综合观看成人91| 91精品国产综合久久久久久久| 国产成人综合自拍| 欧美日韩高清一区二区三区| 婷婷久久综合九色国产成人| 久久久亚洲精品一区二区三区| 91久久精品国产91性色tv| 麻豆一区二区99久久久久| 综合婷婷亚洲小说| 欧美成人欧美edvon| 色欧美日韩亚洲| 国产精品一线二线三线| 亚洲国产精品麻豆| 欧美国产综合一区二区| 欧美一区午夜视频在线观看| 不卡免费追剧大全电视剧网站| 七七婷婷婷婷精品国产| 日韩伦理免费电影| 26uuu亚洲婷婷狠狠天堂| 欧美性做爰猛烈叫床潮| 国产成人综合网站| 免费高清在线一区| 亚洲男同性恋视频| 国产午夜久久久久| 日韩一区二区影院| 欧美亚洲国产一区二区三区va| 国产精品夜夜嗨| 毛片不卡一区二区| 亚洲国产一区二区视频| 亚洲视频中文字幕| 国产蜜臀av在线一区二区三区| 欧美一卡在线观看| 欧美日韩视频在线一区二区| av一区二区久久| 国产成人超碰人人澡人人澡| 久久国产精品色婷婷| 午夜精品影院在线观看| 亚洲日穴在线视频| 国产精品素人一区二区| 欧美va亚洲va香蕉在线| 91精品国产高清一区二区三区| 欧美性一二三区| 色噜噜夜夜夜综合网| 国产成人一级电影| 国内成人精品2018免费看| 蜜臀久久99精品久久久久久9| 亚洲国产色一区| 亚洲国产综合色| 一区二区国产视频| 亚洲人123区| 亚洲欧洲日韩综合一区二区| 国产欧美一区二区三区鸳鸯浴| 久久久精品综合| 精品国产一区a| www成人在线观看|