function [fqr_percent, fqr_raw]=fqbrainr(fq_raw)
%fqbrainr.m rev tly 94,1,18 95,4,6; takes listing of checked statements in "fqBrainQ.doc Chinese Translation of the modified Lumsdaine brief form (ASCII version saved as fqBrainQ.txt), rev TLYeh 84,12,12"
%  returns 3 cols of 4Q raw counts in fqr_raw and percentage in fqr_percent for Apparent, True, and Self Expectation, 
% fq_raw has 3 rows of statement check marks for True, Apparent, and Self Expectation, as appeared on the questionair, respectively.
%  also calls fqbraip to plot on current figure window 3 4Q squares for each person, then pause: 
%   Apparent=solid, True=doted-circle, Expectation=dashed-cross
% calls fqbrainp(fq_raw,point,line) to plot each 4Q square and get percent, with 
%   line/tips style specified by character string 'line'/'point', 
% do whitebg; before any figure is plotted, otherwise, close before whitebg again.
%* For matlab 4.* figure window: <edit><copy option> set to <bit map>, ­Y³]¦¨<meta file>, §â¹Ï copy paste ¨ì word ¤¤¤§«á¡A¦C¦L¥X¨Ó®É ÂI½u : §é½u -- ³£ÅÜ¦¨¹ê½u ¦ÓµLªk°Ï¤À¡I
%statement quadrant template:
%q_=[A A B A B C B D  A A B B D  B B B B B D A C D C D D  A D D A D A D D D  D C D  A A C D C C A B C C C  A B C A B C B B A B C C C];
 qa=[1 1 0 1 0 0 0 0  1 1 0 0 0  0 0 0 0 0 0 1 0 0 0 0 0  1 0 0 1 0 1 0 0 0  0 0 0  1 1 0 0 0 0 1 0 0 0 0  1 0 0 1 0 0 0 0 1 0 0 0 0]; % category A
 qb=[0 0 1 0 1 0 1 0  0 0 1 1 0  1 1 1 1 1 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0  0 0 0  0 0 0 0 0 0 0 1 0 0 0  0 1 0 0 1 0 1 1 0 1 0 0 0]; % category B
 qc=[0 0 0 0 0 1 0 0  0 0 0 0 0  0 0 0 0 0 0 0 1 0 1 0 0  0 0 0 0 0 0 0 0 0  0 1 0  0 0 1 0 1 1 0 0 1 1 1  0 0 1 0 0 1 0 0 0 0 1 1 1]; % category C
 qd=[0 0 0 0 0 0 0 1  0 0 0 0 1  0 0 0 0 0 1 0 0 1 0 1 1  0 1 1 0 1 0 1 1 1  1 0 1  0 0 0 1 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0]; % category D
%fq_tly for testing
fqt=[1 0 0 1 1 1 1 1  0 1 1 1 0  0 0 0 0 1 1 1 0 0 1 1 1  1 0 1 1 1 1 1 1 1  0 0 0  1 0 0 0 0 1 1 0 0 0 0  1 0 1 1 1 1 0 1 0 0 0 0 0; % true self
     1 1 0 1 1 1 0 1  1 1 1 1 1  1 1 1 1 1 0 1 1 1 1 1 0  1 1 1 1 1 1 1 1 1  1 1 1  1 0 0 0 0 0 1 0 0 0 0  1 1 1 1 1 1 1 1 1 0 1 1 1; % apparent
     1 1 0 1 1 1 0 1  1 1 1 1 1  1 1 1 0 0 0 0 0 1 0 1 0  1 1 1 1 1 1 0 1 0  1 1 1  1 1 1 0 0 0 0 0 0 0 0  1 0 1 1 1 1 1 1 1 1 1 1 1 ]; % expectation
t3_raw=zeros([4,3]); fqr_raw=zeros([4,3]);
for k=[1:3],
 t3_raw(:,k)=[qa*fq_raw(k,:)'; qb*fq_raw(k,:)'; qc*fq_raw(k,:)'; qd*fq_raw(k,:)'];
end
 fqr_raw(:,2)=t3_raw(:,1); fqr_raw(:,1)=t3_raw(:,2); fqr_raw(:,3)=t3_raw(:,3); 
t3_perc=zeros([4,3]); 
hold off
 t3_perc(:,2)=fqbrainp(t3_raw(:,1),'ok',':k'); % true-hidden
hold on
 t3_perc(:,1)=fqbrainp(t3_raw(:,2),'k','k'); % apparent
hold on
 t3_perc(:,3)=fqbrainp(t3_raw(:,3),'+k','--k'); % expectation
hold on
 xlabel('_____ apparent, ..o.. true.hidden, --+-- self-expect')
 % plotting central and diagonal axes:
 plot([[-1;1],[0;0],[-1;1],[-1;1]],[[0;0],[-1;1],[-1;1],[1;-1]],':r');
hold off
 fqr_percent=t3_perc;
return
