Inserting data into matrix of zeros from another matrix

2 views (last 30 days)
I have a matrix [signal] of 315954x64 of signal data. In another matrix [state.Flashing] (315954x1) there is logical 1 or 0 depending on an activation
I have categorized the signal matrix to obtain a matrix [FFsignal] (155520x64) of data when there is an activation:
for i = 1:length(signal)
FFlash = find (state.Flashing(1:i,1)==1);
FFsignal= signal(FFlash);
I want to graph these activations(64 diff channels) with the x axis the scale of the signal(315954) so I need matrices of similar dimensions so I wanted to insert the categorized data into a matrix of zeros of size (315954x64)
For example the first group of activation is in rows 631-654 and when categorized I have data for those time points. I want to add this data to a matrix of zeros in the same time points if possible. Therego, zeros until 631-654 and so on through the 315954 rows. Please help and of course thanks in advance!!

Answers (0)


Find more on Descriptive Statistics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by