%fqbrainf.m rev tly 94,1,19; fcc class fq test results by statement check listing
%* For matlab 4.* figure window: <edit><copy option> set to <bit map>, 若設成<meta file>, 把圖 copy paste 到 word 中之後，列印出來時 點線 : 折線 -- 都變成實線 而無法區分！
%calls function [fqr_percent, fqr_raw]=fqbrainr(fq_raw)
%% 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 cols 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.
%%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
% "t"ly, "f"cc, 王..r, j..珍, 丁..w, 曾s.., h..敏, l..君
%
%From: Tse-Liang Yeh <tlyeh@cc.ncu.edu.tw> Tue, 18 Jan 2005 23:33:42 +0800 (CST)
%To: 92127005@cc.ncu.edu.tw, doz@mail2000.com.tw, fcc@cc.ncu.edu.tw, wei@alumni.nccu.edu.tw
%Subject: (rev) fqbrainf 錄音
%4Q問卷 錄音檔案 http://www.ncu.edu.tw/~ncume_ee/nsc88cre.ee/fcc/fq94117.cvs
%  請安裝播放程式
% http://www.ncu.edu.tw/~w3meng/license_open/aiwavoicemailplayer2001a18_jpn.exe
%  安裝說明 在
% http://www.ncu.edu.tw/~w3meng/license_open/aiwavoic.txt
%錄音檔內容大綱如下:
%  fq94117.cvs fqbrainf 94117 對fcc研究小組講
% NedHerrmann 4Q思考模式及Lumsdaine簡易問卷的填寫,
%53: tly數據, 1:2:20理性強的可以造假,
%1:5:37 94118對fcc講fqbrainq.doc問卷結果之解讀 fqbrainf.m fqbrainf.doc,
%  圖說 一般性的解讀,
%1:8:10 S數據解讀, 1:12:3 h, 1:15:0 r, 1:16:53 w, 1:19:0 怎麼抓可說之處,
%1:21:10 w v.s. j, (好像對j數據的解讀不多), 1:23:0 l, 1:26:30 f,
%1:28:50 基本解讀 平衡 輔導 接受適性 v.s. 調整的策略,
%1:32:20 對更嚴格的精準的人來說 問卷的敘述 是否不適用 而造成 調查結果的扭曲,
%1:34:0 如何練習做解說, (1:36:24閒談 展現沒耐性的樣子),
%1:38:0 fcc說可能的應用, 1:42:0 探索C的面向 知道 與 價值觀,
%1:43:40 內行人士 答問卷的模擬心態 自我探索,
%1:44:50 向度是相對的 對問題的挑剔 生活內容 研究方式 與 問題內涵 的 相左
% 是否會造成扭曲,
%1:48:46 溫柔的新娘子? (這段有點敏感不宜外傳) 1:51:25
%ref: 
%http://www.ncu.edu.tw/~tlyeh/之下的 fqbrainq.doc fqbrainf.m fqbrainr.m fqbrainp.m
%http://www.ncu.edu.tw/~ncume_ee/nsc88cre.ee/fcc/fqbrainf.doc

['To run whitebg, "close all" figure windows first!']
% sample template of 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
figure(1), [fqt_pc, fqt_r]= fqbrainr(fqt), tpc100=round(100*fqt_pc);
 title(['fqt:','count[', ...
  int2str(fqt_r(:,1)),',', int2str(fqt_r(:,2)),',', int2str(fqt_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

['fcc class 93F: "f"cc, 王..r, j..珍, 丁..w, 曾s.., h..敏, l..君']

fqf=[0 1 0 1 0 1 0 1  0 0 0 0 0  1 0 0 1 0 0 1 0 0 0 1 0  0 0 0 0 0 0 0 0 1  0 0 0  0 0 1 0 0 1 0 1 1 0 0  1 1 1 0 0 1 0 0 0 0 0 1 0; % true self
     0 1 0 0 0 1 1 1  0 1 0 0 1  1 0 0 1 0 1 0 1 0 0 1 0  0 0 0 1 0 1 0 0 0  1 1 0  0 0 1 0 0 1 0 1 0 0 0  1 1 1 1 0 1 0 0 0 0 1 1 0; % apparent
     1 0 1 0 0 0 0 0  0 0 0 1 0  0 1 0 0 0 0 0 0 0 0 0 0  0 0 0 0 0 0 1 0 0  0 0 0  0 0 0 0 0 0 0 0 0 1 0  0 0 0 0 0 0 0 1 0 0 0 0 0 ]; % expectation
figure(2), [fqf_pc, fqf_r]= fqbrainr(fqf), tpc100=round(100*fqf_pc);
 title(['fqf:','count[', ...
  int2str(fqf_r(:,1)),',', int2str(fqf_r(:,2)),',', int2str(fqf_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

fqr=[1 1 0 1 0 0 0 1  0 0 0 0 1  0 0 1 0 1 1 0 1 1 0 1 0  1 0 1 0 1 0 1 0 0  1 0 1  1 0 1 1 1 1 1 0 0 0 1  1 1 1 1 0 1 0 1 0 0 1 1 1; % true self
     1 1 0 1 0 0 0 1  0 0 0 0 1  0 0 1 0 0 1 0 1 1 0 1 0  0 0 1 0 1 0 0 0 0  1 0 1  1 0 1 1 1 1 1 0 1 0 1  1 1 1 1 0 1 0 1 0 0 1 1 1; % apparent
     0 0 0 0 0 1 0 0  0 0 0 0 0  0 0 0 0 0 0 0 0 0 0 0 1  0 0 0 0 0 1 0 0 0  0 1 0  0 1 0 0 0 0 0 1 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 ]; % expectation
figure(3), [fqr_pc, fqr_r]= fqbrainr(fqr), tpc100=round(100*fqr_pc);
 title(['fqr:','count[', ...
  int2str(fqr_r(:,1)),',', int2str(fqr_r(:,2)),',', int2str(fqr_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

fqj=[0 1 1 1 0 1 0 1  0 0 0 1 1  0 0 0 0 1 1 1 1 0 0 0 0  1 0 1 0 1 1 1 1 1  1 1 1  0 0 1 1 0 0 0 1 1 1 1  1 1 1 1 0 1 0 0 0 1 1 1 1; % true self
     0 1 1 1 0 0 0 1  0 0 0 1 1  0 0 0 0 1 1 1 1 0 0 0 0  1 0 1 0 1 0 1 1 1  0 1 1  0 0 1 1 0 0 0 1 1 1 1  1 1 1 1 0 1 0 1 0 1 1 1 1; % apparent
     0 0 0 0 0 1 0 0  0 1 1 0 0  1 0 0 0 0 0 0 0 1 0 0 1  0 1 0 1 0 1 0 0 0  1 0 0  0 0 0 0 0 0 1 0 0 0 0  0 0 0 0 0 0 1 1 1 0 0 0 0 ]; % expectation
figure(4), [fqj_pc, fqj_r]= fqbrainr(fqj), tpc100=round(100*fqj_pc);
 title(['fqj:','count[', ...
  int2str(fqj_r(:,1)),',', int2str(fqj_r(:,2)),',', int2str(fqj_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

fqw=[1 1 1 1 1 1 0 0  0 0 0 0 1  0 1 1 0 0 0 0 1 0 1 1 1  1 0 0 0 1 0 0 1 1  1 1 0  0 0 1 1 0 1 0 1 1 0 0  1 0 1 1 1 1 0 1 1 1 0 1 0; % true self
     1 1 1 1 1 0 0 0  0 0 0 0 1  0 1 1 0 0 0 0 1 0 1 1 1  1 0 1 0 1 1 0 1 0  0 1 0  0 0 1 1 0 1 0 1 1 0 1  1 0 1 1 1 1 0 0 1 0 0 1 0; % apparent
     0 0 0 0 1 0 0 1  0 1 0 0 0  1 0 0 1 0 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 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 ]; % expectation
figure(5), [fqw_pc, fqw_r]= fqbrainr(fqw), tpc100=round(100*fqw_pc);
 title(['fqw:','count[', ...
  int2str(fqw_r(:,1)),',', int2str(fqw_r(:,2)),',', int2str(fqw_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

fqs=[0 1 0 1 0 0 0 0  0 0 0 0 0  1 1 1 0 0 0 0 1 0 0 0 0  0 1 0 0 0 0 0 1 1  0 1 1  0 0 1 0 1 0 0 0 1 1 1  1 0 0 1 1 1 1 0 1 0 1 0 0; % true self
     0 1 0 1 0 1 0 1  1 1 0 0 0  1 1 0 0 0 0 0 1 0 0 0 0  0 1 0 0 0 0 0 1 1  0 1 1  0 0 1 1 1 0 0 0 1 1 1  1 0 0 1 0 1 1 0 1 0 0 0 0; % apparent
     1 0 0 0 0 1 0 1  1 1 1 1 1  0 0 0 0 0 1 0 0 0 0 1 0  0 0 1 1 0 1 0 0 0  1 0 0  0 0 0 0 0 0 1 1 0 0 0  0 0 0 0 0 0 0 0 0 0 0 0 0 ]; % expectation
figure(6), [fqs_pc, fqs_r]= fqbrainr(fqs), tpc100=round(100*fqs_pc);
 title(['fqs:','count[', ...
  int2str(fqs_r(:,1)),',', int2str(fqs_r(:,2)),',', int2str(fqs_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

fqh=[0 0 1 0 0 1 0 1  0 0 0 1 1  0 0 0 0 0 0 0 1 0 0 1 0  0 0 1 0 1 0 0 1 1  1 1 1  0 0 1 0 0 0 0 1 1 1 1  0 1 1 0 0 1 0 1 0 0 1 1 0; % true self
     0 1 0 1 0 1 0 1  0 0 0 1 1  0 0 0 0 0 1 0 1 1 0 1 0  0 1 1 0 1 0 1 1 0  1 1 1  0 0 1 1 1 0 0 1 1 1 1  0 1 1 0 0 1 1 1 1 0 1 1 0; % apparent
     1 1 0 0 0 0 0 0  0 1 1 0 0  1 0 0 1 0 1 0 0 0 1 0 1  0 1 0 0 0 1 0 0 0  0 0 0  1 1 0 0 0 0 1 0 0 0 0  0 0 0 0 1 0 0 0 0 0 0 0 0 ]; % expectation
figure(7), [fqh_pc, fqh_r]= fqbrainr(fqh), tpc100=round(100*fqh_pc);
 title(['fqh:','count[', ...
  int2str(fqh_r(:,1)),',', int2str(fqh_r(:,2)),',', int2str(fqh_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

fql=[0 1 0 0 0 1 0 0  0 0 0 1 0  0 1 0 0 0 0 0 1 0 1 0 1  0 0 0 0 0 0 1 1 1  0 0 1  0 0 1 1 0 1 0 0 1 1 0  1 0 1 1 1 1 0 0 0 0 1 0 1; % true self
     0 1 0 1 0 1 0 0  0 0 0 1 0  0 1 0 0 0 0 0 1 0 1 0 1  0 0 1 0 0 0 1 1 1  0 0 1  0 0 1 1 0 1 0 0 1 0 0  1 0 1 1 1 1 0 1 0 0 1 0 1; % apparent
     1 0 1 0 1 0 1 1  1 0 1 0 1  1 0 1 1 0 1 0 0 1 0 1 0  0 1 0 1 1 1 0 0 0  1 1 0  0 0 0 0 0 0 0 1 0 0 0  0 0 0 0 0 0 0 1 1 1 0 1 0 ]; % expectation
figure(8), [fql_pc, fql_r]= fqbrainr(fql), tpc100=round(100*fql_pc);
 title(['fql:','count[', ...
  int2str(fql_r(:,1)),',', int2str(fql_r(:,2)),',', int2str(fql_r(:,3)), ...
    '],%[', ...
  int2str(tpc100(:,1)),',', int2str(tpc100(:,2)),',', int2str(tpc100(:,3)), ...
    ']'])

% The fcc group average including the teacher: 

% avg by %
fccg_pc=zeros([4,3]);
for k=[1:3], 
 fccg_pc(:,k)= ...
 mean([fqf_pc(:,k),fqr_pc(:,k),fqw_pc(:,k),fqj_pc(:,k),fqs_pc(:,k),fql_pc(:,k),fqh_pc(:,k)]')';
end
figure(9), 
fccg_pc100=zeros([4,3]);
hold off
 fccg_pc100(:,1)=round(100*fqbrainp(fccg_pc(:,1),'k','k')); % apparent
hold on
 fccg_pc100(:,2)=round(100*fqbrainp(fccg_pc(:,2),'ok',':k')); % true-hidden
hold on
 fccg_pc100(:,3)=round(100*fqbrainp(fccg_pc(:,3),'+k','--k')); % expectation
 xlabel('___apparent ...true.hidden ---self-expect')
title(['fcc_group w/teacher avg by %:', ...
    '%[', ...
  int2str(fccg_pc100(:,1)),',', int2str(fccg_pc100(:,2)),',', int2str(fccg_pc100(:,3)), ...
    ']'])
hold off
fccg_pc, fccg_pc100,

% avg by count
fccg=zeros([4,3]);
for k=[1:3], 
 fccg(:,k)= ...
 round(mean([fqf_r(:,k),fqr_r(:,k),fqw_r(:,k),fqj_r(:,k),fqs_r(:,k),fql_r(:,k),fqh_r(:,k)]')');
end
figure(10), 
fccgpc100=zeros([4,3]);
hold off
 fccgpc100(:,1)=round(100*fqbrainp(fccg(:,1),'k','k')); % apparent
hold on
 fccgpc100(:,2)=round(100*fqbrainp(fccg(:,2),'ok',':k')); % true-hidden
hold on
 fccgpc100(:,3)=round(100*fqbrainp(fccg(:,3),'+k','--k')); % expectation
 xlabel('___apparent ...true.hidden ---self-expect')
title(['fcc_group w/teacher avg by count:', ...
    '%[', ...
  int2str(fccgpc100(:,1)),',', int2str(fccgpc100(:,2)),',', int2str(fccgpc100(:,3)), ...
    ']'])
hold off
fccg, fccgpc100,

