fill and replicate numbers in the matrix
Ältere Kommentare anzeigen
Hi,
I am trying to refill excell matrix with numbers and would like to ask if there are easy way to do it in matlab
I have matrices of 4 columns that log stimuli representation in time (logfile, attached below ). The rows are time and the columns are events. The first column logs stimuli id in time. (No stimulus =0, stimulus : 1 2 3 4 5 or 6) The second column logs stimulus presentation (0=no stimulus, 2=stimulus) column 4 logs Id of repetition for 6 stimuli.
I need to mark in column2 pre stimulus interval =1 and poststimulus interval=3. For that I need to replace zeros with 1 before stimulus presentation (row 1 to 95 and then devide and replace first half of the rows after the stimulus with 3 (post stimulus interval) and another half with 1 ( pre stimulus interval) as in an example file attached below. in the column 3 I need to add Ids of repeats of each trial write it in each row (pre stimulus + stimulus+ poststimulus) as in example file. Could anyone help with this?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB Support Package for Arduino Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!