本文共 532 字,大约阅读时间需要 1 分钟。
function [Dictionary]=train(D,n)param.L = 3; % number of elements in each linear combination.param.K = n; % number of dictionary elementsparam.numIteration = 6; % number of iteration to execute the K-SVD algorithm.param.errorFlag = 0; % decompose signals until a certain error is reached. do not use fix number of coefficients.%param.errorGoal = sigma;param.preserveDCAtom = 0;param.InitializationMethod = 'DataElements';param.displayProgress = 1;disp('Starting to train the dictionary');[Dictionary,output] = KSVD(D,param);end
转载地址:http://kdcp.baihongyu.com/