Matsig is an object-oriented signal class library for MATLAB 6.5 and later. It implements a signal c

源代码在线查看: extract.m

软件大小: 159 K
上传用户: leeixndong
关键词: signal object-oriented implements library
下载地址: 免注册下载 普通下载 VIP

相关代码

				function x = extract(m, segment_type, segment_id)				% function x = extract(m, segment_type, segment_id)								if nargin < 3				    segment_id = '';				end								switch segment_type				    case 'phone',				        if length(segment_id) > 0				            ix = strmatch(segment_id, {m.phone_list.phone}, 'exact');				        else				            ix = 1:length(m.phone_list);				        end				        x = {};				        for k = 1:length(ix)				            x{k} = m.s.s((m.phone_list(ix(k)).start+1):m.phone_list(ix(k)).end);;				        end				    case 'word',				        if length(segment_id) > 0				            ix = strmatch(segment_id, {m.word_list.word}, 'exact');				        else				            ix = 1:length(m.word_list);				        end				        x = {};				        for k = 1:length(ix)				            x{k} = m.s.s((m.word_list(ix(k)).start+1):m.word_list(ix(k)).end);;				        end				    case 'text',				        x = m.s.s(m.text.start+1:m.text.end);				    otherwise,				        error('Unknown segment type');				end							

相关资源