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

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

?? fxdownload.m

?? FKNN:模糊KNN分類算法
?? M
?? 第 1 頁 / 共 2 頁
字號:
function fxdownload(fileid,isselectPath,indexPath)
%FXDOWNLOAD  Download a file from MATLAB Central File Exchange.
%
%   FXDOWNLOAD(fileid) downloads a file with specified fileid into the
%   indexPath\fxdownloads directory. The indexPath is the downloads
%   location, retrieved from previous download. If downloading for the
%   first time it will prompt the user to select the download directory. If
%   the downloading file is a zip file, it will extracts the archived
%   contents of the file or else for all other formats just downloads the
%   file. These files are downloaded into a directory with name format
%   [filename][fileid] and after the download is complete it will CD to
%   this directory and opens up fxsummary.html page.
%
%   FXDOWNLOAD(fileid,isselectPath) downloads the file with specified
%   fileid with an option of selecting a indexPath, if isselectPath
%   is 1. If isselectPath is 0 indexPath is choosen from previous download.
%
%   FXDOWNLOAD(fileid,isselectPath,indexPath) downloads the file with
%   specified fileid with an option of passing indexPath. When passing an
%   indexPath isselectPath should be 0. If isselectPath is 1 it will
%   prompt the user to choose indexPath and overwrites the value that is
%   passed.
%
%   Example:
%     fxdownload(1613)
%     fxdownload(1613,1)
%     fxdownload(1613,0,'C:\matlab')
%
%   NOTE: 1.Fileid can be found in MATLAB Central->File Exchange site.
%         2.For every new indexPath, this function will
%         create a fxdownloads directory with in indexPath and then
%         download the file into respective file name. If for the
%         next download another directory, one level above or below the
%         fxdownloads, is choosen then it will not create fxdownloads
%         directory again. It will download the file into previous
%         fxdownloads directory.

%   Copyright 1984-2006 The MathWorks, Inc.
%   Author : Santosh Kasula

%default is set to 0 to get the value from getpref
if (nargin < 2), isselectPath = 0; end
if (nargin < 3), indexPath = ''; end

mainIndexPath = fullfile(fileparts(prefdir),'fxdownloads');
[indexPath,rootPath] = selectIndexPath(isselectPath,indexPath,mainIndexPath);
%exit if no indexPath is selected
if rootPath == 0
    return
end

intro = '<h1><center>File Exchange Downloads</center></h1>';
indexHtmlFilename = 'downloads_index.html';

searchstr = ['http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=' sprintf('%.0f',fileid)];
htmlText = urlread(searchstr);
filename = strrep(regexp(htmlText,'"fileName" value="(.*?)">','tokens','once'),' ','%20');

%File Extention
fe = regexp(htmlText,'name="fileExt" value="(.*?)">','tokens','once');
%contributorId
contributorId = regexp(htmlText,'"contributorId" value="(.*?)">','tokens','once');

%Download file URL
downloadFileURL = ['http://www.mathworks.com/matlabcentral/fileexchange/download.do?objectId=' sprintf('%.0f',fileid) ...
    '&fn=' filename{1} '&fe=' fe{1} '&cid=' contributorId{1}];

%Create a donwloaDir
[downloadDir,dirname,isOverWrite] = createdownloadDir(indexPath,fileid,filename);
if strcmp(isOverWrite,'Cancel')
    return
end

%download file
unzipfilenames = downloadfile(downloadFileURL,downloadDir,filename,fe);

%Get the relevant html info in a structure
d = relevantHtmlInfo(htmlText,fileid,filename,dirname,downloadDir,contributorId,unzipfilenames);

%Create an index page for all downloads in a particular location
writeIndex(indexPath,indexHtmlFilename,downloadDir,intro,d);

%Create a summary page for each individual download
createSummaryPage(indexPath,indexHtmlFilename,downloadDir)

%Create main index for all downloads in all locations
[dirPath fxdirname] = fileparts(fileparts(indexPath));
if strcmp(fxdirname,'fxdownloads')
    updatefxindex(fullfile(fileparts(indexPath),indexHtmlFilename),0);
end

%open fxsummary page
web(fullfile(downloadDir,'fxsummary.html'));

%==========================================================================
function [indexPath,rootPath] = selectIndexPath(isselectPath,indexPath,mainIndexPath)
%SELECTINDEXPATH  Select a direcoty to download a file.

%get the indexPath from the preference already set if indexPath is not
%passed
if ispref('fileexchange','prefindexPath') && isempty(indexPath)
    indexPath = getpref('fileexchange','prefindexPath');
end
rootPath = '';
%get the user input for indexPath if it is empty or user want to change the
%indexPath preference.
if isempty(indexPath) || isselectPath
    rootPath = uigetdir(cd,'Select a folder');
    %
    if rootPath == 0
        %exit if no directory is choosen
        return;
    end
    cd(rootPath);
    [dirpath filename ext] = fileparts(rootPath);
    %check the validity of the directory
    if isempty(ext)
        %check if the directory choosen is fxdownloads. if fxdownloads direcoty
        %is choosen assign user selected directory as indexPath or else
        %create a fxdownloads directory and assign it indexPath
        if ~isempty(filename)
            [localdirPath localFilename] = fileparts(dirpath);
            if ~strcmp(filename,'fxdownloads') && ~strcmp(localFilename,'fxdownloads')
                [subdirpath subfilename] = fileparts(dirpath);
                if strcmp(subfilename,'fxdownloads')
                    indexPath = rootPath;
                else
                    if ~isdir('fxdownloads')
                        [status, message, mesageid] = mkdir('fxdownloads');
                        if status == 0
                            errordlg([mesageid ': ' message],'Error');
                        end
                        indexPath = fullfile(rootPath,'fxdownloads');

                    else
                        indexPath = fullfile(rootPath,'fxdownloads');
                    end
                end
            else
                indexPath = rootPath;
            end
        else
            indexPath = fullfile(rootPath,'fxdownloads');
        end
        if ispref('fileexchange','prefindexPath')
            setpref('fileexchange','prefindexPath',indexPath);
        else
            addpref('fileexchange','prefindexPath',indexPath);
        end
    else
        errordlg('Invalid filname.', 'Error');
    end
end
%check if prefindexPath preferece is already existing if not add prefindexPath
%preference to fileexchange group
saveindexPath(indexPath,mainIndexPath);


%==========================================================================
function saveindexPath(indexPath,mainIndexPath)
%SAVEINDEXPATH  Save the selected indexPath into a mat file.

if ~isdir(mainIndexPath)
    mkdir(mainIndexPath)
end
filename = dir(fullfile(mainIndexPath,'indexPathList.mat'));
if ~isempty(filename)
    load(fullfile(mainIndexPath,'indexPathList.mat'),'newindexPathList');
    for i=1:length(newindexPathList)
        if strcmp(newindexPathList(i).indexPath,indexPath)
            isindexPathexisting = true;
            newindexPathList(i).indexPath = indexPath;
            break;
        else
            isindexPathexisting = false;
        end
    end
    if ~isindexPathexisting
        newindexPathList(length(newindexPathList)+1).indexPath = indexPath; %#ok<NASGU>
    end
else
    newindexPathList(1).indexPath = indexPath;
end
save (fullfile(mainIndexPath,'indexPathList.mat'),'newindexPathList');

%==========================================================================
function [downloadDir,dirname,isOverWrite] = createdownloadDir(indexPath,fileid,filename)
%CREATEDOWNLOADDIR  Create a directory name in the format [filename][fid].

dirname = strrep(strcat(strrep(filename{1},'.','_'),sprintf('%.0f',fileid)),'%20','_');
downloadDir = strrep(fullfile(indexPath,dirname),'%20',' ');
isdirExsting = isdir(downloadDir);

%by default do not overwrite a folder
isOverWrite = 'yes';

%If directroy already existing ask the user to Overwrite/Cancel?
if isdirExsting
    isOverWrite = questdlg('The Directory already exists. Do you want to Overwrite? ','Directory already existing','Ok','Cancel','Ok');
    %   ButtonName = questdlg('What is your favorite color?','Color Question','Red', 'Green', 'Blue', 'Green');
    if isempty(isOverWrite)
        isOverWrite = 'Cancel';
    end
    switch  lower(isOverWrite)
        case 'ok'
            cd ..
            rmdir(downloadDir,'s')
        case 'cancel'
            return
    end
end

%Create a Download directory
[status, message, mesageid] = mkdir(downloadDir);
%Return if there is any error in the directory creation
if status == 0
    error(mesageid, message);
end
%==========================================================================
function unzipfilenames = downloadfile(downloadFileURL,downloadDir,filename,fe)
%DOWNLOADFILE  Download a file.

%Download the file
if strcmp(fe{1},'.zip')
    %If zip file, unzip the file in download directory
    tempdownloadDir = fullfile(tempdir,'fxdownloads');
    mkdir(tempdownloadDir);
    [tempHtmlfile,status] = urlwrite(downloadFileURL,fullfile(tempdownloadDir,strcat(filename{1},'.html')));
    if isequal(status,1)
        unzip(tempHtmlfile, tempdownloadDir);
        delete(tempHtmlfile);
    else
        error('Error unzipping the URL')
    end
    dirlist = getsubdirs(tempdownloadDir);
    mfilecount=0;
    allfilecount = 0;
    for n=1:length(dirlist)
        allfiles = dir(dirlist{n});
        allfiles = allfiles(logical(~[allfiles.isdir]));
        if ~isempty(allfiles)
            for k=1:length(allfiles)
                allfilecount = allfilecount + 1;
                allunzipfiles{allfilecount} = fullfile(dirlist{n},allfiles(k).name);
            end
        end
    end
    dirfiles = tempdownloadDir;
    while true
        tempdirfiles = dir(dirfiles);
        if length(tempdirfiles) <= 3 && length(tempdirfiles(logical([tempdirfiles.isdir]))) >= 3
            for n = 1:length(tempdirfiles)
                if      ~strcmp(tempdirfiles(n).name(1),'.') && ...
                        ~strcmp(tempdirfiles(n).name,'.') && ...
                        ~strcmp(tempdirfiles(n).name,'..') && ...
                        tempdirfiles(n).isdir
                    tempdirfilename = tempdirfiles(n).name;
                end
            end
            dirfiles = fullfile(dirfiles,tempdirfilename);
        else
            break;
        end
    end
    [status,message,messageid] = copyfile(dirfiles,downloadDir,'f');
    for i=1:length(allunzipfiles)
        unzipfilenames(i) = strrep(strrep(allunzipfiles(i),dirfiles,downloadDir),'/','\');
    end
    %Return if there is any error in the directory moving
    if status == 0
        error(mesageid, message);
    end
    cd(tempdir);
    rmdir(tempdownloadDir,'s');
else
    %any file extension save the file in download directory

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品少妇一区二区三区在线播放| 欧美午夜理伦三级在线观看| 成人国产精品免费观看动漫| 在线精品国精品国产尤物884a| 日韩精品一区二区三区在线播放| 一区精品在线播放| 婷婷丁香久久五月婷婷| 成人听书哪个软件好| 日韩一区二区视频在线观看| 一区二区三区.www| 欧美日韩一本到| 久久精品亚洲精品国产欧美kt∨ | 一区二区三区日本| 久久精品二区亚洲w码| 欧美中文字幕一区二区三区亚洲| 国产校园另类小说区| 麻豆91在线看| 91精品久久久久久久91蜜桃| 亚洲自拍偷拍九九九| 9i在线看片成人免费| 久久夜色精品国产欧美乱极品| 亚洲国产精品自拍| 日本黄色一区二区| 国产精品蜜臀av| 国产精品1区2区| 欧美精品一区二区三区在线播放| 偷偷要91色婷婷| 欧美色图第一页| 一区二区三区加勒比av| 色伊人久久综合中文字幕| 国产欧美综合在线观看第十页| 紧缚捆绑精品一区二区| 欧美一区二区观看视频| 美女视频免费一区| 91精品国产欧美一区二区| 亚洲a一区二区| 欧美精品v日韩精品v韩国精品v| 亚洲一区二区3| 欧美日韩精品三区| 亚洲成人资源在线| 51午夜精品国产| 蜜桃久久精品一区二区| 精品av久久707| 成人午夜在线免费| 亚洲丝袜另类动漫二区| 99久久精品国产毛片| 亚洲精品ww久久久久久p站| 欧美亚洲尤物久久| 日本不卡视频一二三区| 26uuu色噜噜精品一区| 国产高清不卡一区| 亚洲欧美日韩久久| 欧美日韩一二区| 麻豆精品一区二区| 中文字幕巨乱亚洲| 欧美主播一区二区三区美女| 男人操女人的视频在线观看欧美| 日韩三级.com| 国产乱码精品1区2区3区| 久久九九全国免费| 东方欧美亚洲色图在线| 综合自拍亚洲综合图不卡区| 91在线观看美女| 日本欧美在线观看| 日韩三级视频中文字幕| 国产精品一区二区黑丝| 国产精品久久久久久久午夜片| 国产剧情一区二区| 国产精品久久久久久久久免费樱桃 | 亚洲国产欧美在线人成| 欧美视频一区在线观看| 另类小说欧美激情| 久久久久久夜精品精品免费| 色综合久久中文字幕| 亚洲一区二区成人在线观看| 精品精品欲导航| 成人免费福利片| 日韩vs国产vs欧美| 2021国产精品久久精品| 色又黄又爽网站www久久| 亚洲国产视频一区| 国产精品久久久久影院亚瑟 | 日韩毛片精品高清免费| 欧美亚洲综合网| 成人中文字幕合集| 亚洲第一精品在线| 亚洲欧美怡红院| 91麻豆精品国产91久久久久| 91影院在线免费观看| 全国精品久久少妇| 亚洲成人免费看| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美日韩一级二级| 大尺度一区二区| 麻豆91精品91久久久的内涵| 国产精品第五页| 欧美激情一区在线观看| 欧美日韩国产区一| 在线视频你懂得一区二区三区| 日本不卡一区二区三区高清视频| 亚洲激情六月丁香| 欧美精品一区男女天堂| 欧洲亚洲国产日韩| 不卡区在线中文字幕| 天天亚洲美女在线视频| 亚洲免费大片在线观看| 亚洲精品在线电影| 精品少妇一区二区三区在线播放| 色狠狠色狠狠综合| 99视频精品全部免费在线| 青青草97国产精品免费观看无弹窗版| 亚洲最快最全在线视频| 国产三级精品三级在线专区| 欧美成人在线直播| 在线观看亚洲成人| 欧美日韩国产一区二区三区地区| 国产91精品免费| 国产成人一区在线| 精品一区二区综合| 国产一区二区三区日韩| 日韩精品每日更新| 美女一区二区久久| 日本不卡在线视频| 久久99精品国产.久久久久| 亚洲福利一二三区| 无吗不卡中文字幕| 亚洲成人动漫在线观看| 日本欧美肥老太交大片| 亚洲成人福利片| 久久99精品一区二区三区三区| 亚洲午夜免费视频| 美女视频黄a大片欧美| 亚洲高清免费在线| 久久精品国产亚洲一区二区三区| 国产欧美日韩中文久久| 成人欧美一区二区三区在线播放| 国产亚洲精品aa| 成人欧美一区二区三区黑人麻豆 | 欧美精品99久久久**| 色婷婷久久综合| 91精品国产综合久久久久久| 欧美午夜电影网| 日韩欧美国产午夜精品| 777奇米成人网| 欧美一区二区视频观看视频| 精品噜噜噜噜久久久久久久久试看 | 成人黄色小视频在线观看| 99国产精品视频免费观看| 91视频国产观看| 欧美日韩一级视频| 日韩一区二区不卡| 国产精品久久久久久久第一福利| 欧美国产精品中文字幕| 亚洲国产成人tv| 久久99国产精品久久99果冻传媒| 成人激情图片网| 色久综合一二码| 成人美女视频在线观看18| 色综合天天在线| 日韩免费电影一区| 国产日韩欧美制服另类| 天堂一区二区在线免费观看| 蜜桃视频一区二区三区| 欧美自拍丝袜亚洲| 日韩丝袜情趣美女图片| 亚洲精品ww久久久久久p站 | 日韩欧美视频在线| 中文字幕欧美激情一区| 美女视频一区在线观看| 国产成人超碰人人澡人人澡| 欧美日韩一区在线观看| 欧美成人性福生活免费看| 一区二区三区久久| 国产在线日韩欧美| 在线综合亚洲欧美在线视频| 久久综合九色综合97婷婷女人 | 亚洲国产成人一区二区三区| 日韩精彩视频在线观看| 国产一区二区不卡| 欧美中文字幕久久| 亚洲欧美国产77777| 极品少妇一区二区| 欧美精品123区| 亚洲人成在线播放网站岛国 | 夜夜嗨av一区二区三区网页| 国产成人久久精品77777最新版本| 91久久精品网| 亚洲视频在线观看三级| 国产精品一区在线| 精品88久久久久88久久久 | 日韩毛片精品高清免费| 激情文学综合网| 日韩精品一区二区三区视频在线观看| 中文字幕免费在线观看视频一区| 国产老妇另类xxxxx| 欧美日韩国产中文| 亚洲 欧美综合在线网络| 欧美性大战xxxxx久久久| 国产精品不卡视频| 波波电影院一区二区三区|