Howdy, Stranger!


Sign In with Facebook Sign In with Google Sign In with OpenID



Run different cases at the same time

tigigitigigi Posts: 2Member
Hi, I'm new to programming and Matlab. I need to make changes to a matlab file. It's a programming analyzing data from different participants in an experiment. The existing programm is written in switch-case, when you key in case 1, it'll just run case 1 for data by participant 1, and it'll show 3 graphs. Now I need to change it to be running 5 cases at the same time and show me 15 graphs at the same time, 3 for each participant. Could anyone help me with it ?

Let me post that part of the programming here. case 99 is to analyze all the data from all participants and will show 3 graphs.

diff = 20; % 30 degree, 0 degree of difference between the 2nd and 3rd digit
subject_no = 1; % 1.ytc 2.ysy 3.ypy 4.ang 5.yhh 6.yty 99.pooling data

switch subject_no
case 1
trial_num = [1 2 3 4 5];

case 2
trial_num = [ 1 2 3 4 5];
case 3
trial_num = [1 2 3 4 5];

case 4
trial_num = [ 1 2 3 4 5 ];

case 5
trial_num = [ 1 2 3 4 5];

case 6
trial_num = [ 1 2 3 4 5];

case 99 % pool 'ysy' 'ytc' 'yty' 'ypy' 'yhh' 'ang'
subj={ 'ysy' 'ytc' 'yty' 'ypy' 'yhh' 'ang' };
trial_num = [ 1 2 3 4 5];

Sign In or Register to comment.