亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
韩日av一区二区| 国产一区二区三区不卡在线观看 | 欧美视频一区二| 精品国产乱码久久久久久浪潮| 中文字幕在线不卡| 国产一区二区视频在线| 欧美日韩成人在线| 国产欧美一区二区精品忘忧草 | 欧美丰满一区二区免费视频| 久久久午夜精品理论片中文字幕| 亚洲国产精品久久人人爱| 国产精品18久久久久久久久久久久| 色久综合一二码| 国产精品久久午夜| 国产在线国偷精品免费看| 91精品国产综合久久久久久| 亚洲精品国产精品乱码不99| 国产成人午夜精品5599| 精品少妇一区二区三区日产乱码 | 日本一区二区综合亚洲| 毛片av中文字幕一区二区| 欧美天堂一区二区三区| 亚洲精品中文在线影院| 99国产精品视频免费观看| 久久免费电影网| 国产成人综合在线| 久久久久久久久97黄色工厂| 精品一区二区三区在线观看国产| 欧美日本乱大交xxxxx| 午夜婷婷国产麻豆精品| 欧美午夜精品久久久久久超碰 | 亚洲国产一区二区三区| 久久久精品影视| 欧美亚洲国产一区二区三区| 欧洲一区二区三区在线| 国产一区二区美女诱惑| 欧美性色aⅴ视频一区日韩精品| 一区二区三区.www| 精品国产百合女同互慰| 夜色激情一区二区| 成人免费看的视频| 色先锋aa成人| 91亚洲精品乱码久久久久久蜜桃 | 欧美一区二区在线免费观看| 欧美日韩1区2区| 欧美韩国日本不卡| www欧美成人18+| 欧美一区二区三区免费视频| 日韩欧美色电影| 在线亚洲欧美专区二区| 国产成人鲁色资源国产91色综 | 国产在线不卡视频| 欧美经典一区二区三区| 日本一区二区在线不卡| 久久综合色一综合色88| 欧美xxxxxxxx| 欧美性大战久久| 亚洲成人激情av| 337p粉嫩大胆色噜噜噜噜亚洲| 91在线无精精品入口| 7878成人国产在线观看| 在线不卡中文字幕播放| av在线这里只有精品| 777a∨成人精品桃花网| 一区二区在线免费| 欧美三级欧美一级| 久久精品国产精品亚洲红杏| 国产午夜精品美女毛片视频| 成人午夜视频在线| 亚洲国产乱码最新视频| 欧美mv和日韩mv国产网站| gogogo免费视频观看亚洲一| 日本高清成人免费播放| 国产精品久久99| 欧美成人乱码一区二区三区| 波多野结衣欧美| 开心九九激情九九欧美日韩精美视频电影| 精品日韩成人av| 欧美久久久久久久久| 成人一二三区视频| 韩国三级中文字幕hd久久精品| 不卡的av电影在线观看| 日韩精品一区二区三区在线观看 | 国产精品久久久久影院色老大| 国产成人av福利| 欧美在线色视频| 久久久久久久久岛国免费| 一区二区中文字幕在线| 欧美一级欧美三级| 亚洲成人免费观看| 色8久久人人97超碰香蕉987| 91精品国产一区二区三区蜜臀| 日本亚洲三级在线| 日韩精品一区二区三区四区视频| 一区二区三区不卡在线观看| 丁香婷婷综合五月| 亚洲理论在线观看| 日韩女优制服丝袜电影| 精品国产亚洲在线| 亚洲国产毛片aaaaa无费看| 欧美精品v日韩精品v韩国精品v| 一区二区成人在线观看| 欧美成人女星排名| 欧美人与性动xxxx| 在线亚洲+欧美+日本专区| 男男视频亚洲欧美| 亚洲靠逼com| 亚洲卡通动漫在线| 国产精品卡一卡二| 国产欧美一区二区三区网站| 777奇米成人网| 日韩一级精品视频在线观看| 色综合久久综合网欧美综合网 | 国产盗摄一区二区| 麻豆成人在线观看| 久久不见久久见中文字幕免费| 亚洲一区二区高清| 日韩av不卡在线观看| 日本va欧美va瓶| 国产在线精品免费| 高清成人在线观看| 91免费看`日韩一区二区| 不卡的av电影在线观看| 亚洲成av人在线观看| 日韩中文欧美在线| 国产制服丝袜一区| 国产69精品久久777的优势| 99在线视频精品| 欧美在线你懂得| 久久久精品欧美丰满| 亚洲天堂久久久久久久| 三级一区在线视频先锋| 美国欧美日韩国产在线播放| 国产麻豆精品在线| 91网站视频在线观看| 欧美高清性hdvideosex| 久久精品人人做| 亚洲乱码中文字幕| 麻豆一区二区三| 色欧美乱欧美15图片| 久久久午夜精品理论片中文字幕| 国产精品传媒视频| 久久99久久精品欧美| 色94色欧美sute亚洲13| 欧美国产精品v| 激情小说欧美图片| 欧美日本一道本在线视频| 中文字幕色av一区二区三区| 国产一区二区剧情av在线| 99视频一区二区| 国产精品麻豆网站| 国产一区二区三区久久久| 91精品国产免费| 亚洲大片免费看| 欧美日韩国产高清一区| 亚洲欧美日韩成人高清在线一区| 国产成人在线电影| 国产精品嫩草影院av蜜臀| 国产一区二区三区蝌蚪| 久久久www成人免费无遮挡大片 | 偷拍与自拍一区| 欧美性猛交一区二区三区精品 | 天堂蜜桃一区二区三区| 欧美日韩视频在线观看一区二区三区 | 亚洲国产日韩综合久久精品| 97精品视频在线观看自产线路二| 国产精品视频一区二区三区不卡| 成人动漫在线一区| 亚洲精品欧美专区| 精品久久国产老人久久综合| 国产一区二区美女诱惑| 中文字幕日本不卡| 欧美日韩中文字幕一区| 六月丁香综合在线视频| 中文无字幕一区二区三区| 色94色欧美sute亚洲线路一ni| 无码av中文一区二区三区桃花岛| 精品精品国产高清a毛片牛牛| 国产91在线|亚洲| 蜜臀av性久久久久av蜜臀妖精| 欧美激情在线一区二区三区| 欧亚洲嫩模精品一区三区| 经典三级在线一区| 亚洲综合久久久| 国产精品成人免费在线| 久久综合色之久久综合| 欧美日韩电影在线播放| 国产成人一级电影| 免费观看91视频大全| 夜夜嗨av一区二区三区| 亚洲色图色小说| 国产日韩精品一区二区三区| 日韩视频在线你懂得| 欧美视频中文字幕| 日本精品视频一区二区| 91色乱码一区二区三区| 91免费看视频| 欧美少妇bbb| 欧美一区二区三区思思人| 色婷婷激情综合|