-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchange_QWE.m
32 lines (27 loc) · 880 Bytes
/
change_QWE.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
%========================================================================%
%Note: %
%This is a subfunction from the Baybayin Word Reader System %
%(Baybayin_word_reader.m) for determining the number of syllables with %
%letter 'd' and their respective location in the word. %
%------------------------------------------------------------------------%
%QWE= the set of all equivalent syllables respective to the acquired
% Latin word equivalent of the Baybayin word input
function [q,qq,w,ww]=change_QWE(QWE)
A=QWE(1,:);
a=length(A);
q=zeros(1,a);
w=zeros(1,a);
qq=0;
ww=0;
for i=1:a
if strcmp(A{i},'de') || strcmp(A{i},'di')
q(i)=1;
qq(i)=i;
elseif strcmp(A{i},'do') || strcmp(A{i},'du')
w(i)=1;
ww(i)=i;
end
end
q=sum(q);
w=sum(w);
end