readdata.m

来自「这个是支持向量聚类机用matlab编译的主程序和部分子程序」· M 代码 · 共 42 行

M
42
字号
%=====================================================================%%   ReadData:%   ---------%%   Parameters:   %       example_set    - The current data index, which the algorithm%                        will test %   %   Return Value:%       Samples        - Matrix which holds the Sample points.%		N              - The number of Samples.%       classification - The apriori classifications for each Data point.%%   Reads the data samples to the Samples matrix%   The columns of 'Samples' are the data points.% %=====================================================================function [Samples, N, classification] = ReadData(example_set)switch example_set        case 1,        % triangle        [Samples, N, classification] = Example1;    case 2,        % star        [Samples, N, classification] = Example2;    case 3,        % 2 3d stars        [Samples, N, classification] = Example3;    case 4,        %iris        [Samples, N, classification] = Iris;    otherwise,        % invalid example number        Samples = 0;end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?