Home > demos > demo_draw_correlation_plots.m

demo_draw_correlation_plots

PURPOSE ^

% Summary

SYNOPSIS ^

function demo_draw_correlation_plots(option)

DESCRIPTION ^

% Summary 
 This function draws correlation plots for multiwork subjects. By default,
 X axis is age, and Y axis is a measure for a particular behavior (e.g.
 proportion looking time to ROI for child). The function creates three
 different .png files and one .csv file.
% Required Arguments

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function demo_draw_correlation_plots(option)
0002 %% Summary
0003 % This function draws correlation plots for multiwork subjects. By default,
0004 % X axis is age, and Y axis is a measure for a particular behavior (e.g.
0005 % proportion looking time to ROI for child). The function creates three
0006 % different .png files and one .csv file.
0007 %% Required Arguments
0008 %
0009 switch option
0010     case 1
0011         % basic usage, cevent or cstream data
0012         varname = 'cevent_eye_roi_child';
0013         subexpIDs = [70 71 72 73 74 75];
0014         measures = {'prop', 'freq', 'mean_dur'};
0015         directory = '/scratch/multimaster/demo_results/draw_correlation_plots/case1/';
0016         nametag = 'eye_roi_child';
0017         draw_correlation_plots(subexpIDs, varname, measures, directory, nametag);
0018         
0019     case 2
0020         % continous measure, replace obj1 with obj# to get mean of all
0021         % objects
0022         varname = 'cont_vision_size_obj#_child';
0023         subexpIDs = [70 71 72 73 74 75];
0024         measures = {'mean'};
0025         directory = '/scratch/multimaster/demo_results/draw_correlation_plots/case2/';
0026         nametag = 'obj_size_child';
0027         draw_correlation_plots(subexpIDs, varname, measures, directory, nametag);
0028         
0029     case 3
0030         % get measure of target object during another specified event
0031         % e.g. prop child looking toward what parent names
0032         varname = 'cevent_eye_roi_child';
0033         subexpIDs = [70 71 72 73 74 75];
0034         args.cevent_name = 'cevent_speech_naming_local-id';
0035         args.cevent_values = 1:3;
0036         args.label_matrix = [1 2 2; 2 1 2; 2 2 1];
0037         args.labels = {'target'};
0038         measures = {'prop'};
0039         directory = '/scratch/multimaster/demo_results/draw_correlation_plots/case3/';
0040         nametag = 'eye_roi_child_target_during_naming';
0041         draw_correlation_plots(subexpIDs, varname, measures, directory, nametag, args);
0042         
0043 end

Generated on Wed 24-May-2017 00:00:56 by m2html © 2005