Question

How can I skip empty cells when averaging during a function?

Hi, I have a function in which I average the values of the doubles within each cell of a cell array. for i = 1:length(explaine...

2 years ago | 1 answer | 0

Question

Anybody here familiar with detrended fluctuation analysis (DFA)?

To those who are familiar with detrended fluctuation,

2 years ago | 1 answer | 0

Question

Problem when using fitrm() function for ANOVA and getting an incomplete output

Hi, for clarity, I have a data set with 36 participants in two conditions called "high and low (18 per condition). In each co...

2 years ago | 1 answer | 0

Question

How do I save multiple PCA results in a cell array? Error: Brace indexing not supported

Hi, I have this raw data set which includes 18 participants. Each participants raw data (21 columns) is saved in a cell. I woul...

2 years ago | 1 answer | 0

Question

How do I correctly apply fitrm?

Hi, I have a data set with two conditions ("H" and "L") and 36 participants. Each participant was measured five times in phases...

2 years ago | 0 answers | 0

Question

Why do I get the error "Undefined function 'fitrm' for input arguments of type 'table' " ?

Hi, I am running into the following error when running the following code: condition = ... ['H' 'H' 'H' 'H' 'H' 'H' 'H' '...

2 years ago | 1 answer | 0

Question

What does it mean to take the absolute of an complex number? And why is it always positive?

Hi, I have a number which is part imaginary or complex. -0.993061325012476 + 1.03511742045580e-16i When I use the function ab...

2 years ago | 3 answers | 0

Question

Why do I get a different result when running code in editor vs. in command window?

Hi, I have a very strange bug which I cant seem to fix. When I run the following code in either the editor or the command windo...

2 years ago | 1 answer | 0

Question

How do I calculate the acceleration using only 3D distances?

Hi, I have a list of distances in each cell of acc_dist . The first three columns in each cell are xyz coordinates. So column o...

2 years ago | 1 answer | 0

Question

How do I average individual values across multiple cells?

Hi, I have a cell array with multiple cells. I would like to average the values inside of each cell with the values inside of a...

2 years ago | 1 answer | 0

Question

Does it make sense to average principal components?

Hi, I have ran a PCA on several participants data sets and would like to get a list of averaged principal components for my ent...

2 years ago | 1 answer | 0

Question

(PCA) How do I find out if principal components (number of significant coefficients) change over time?

Hi, I have an experiement where I am expecting a dimensionality reduction over time. In this experiment there are five phases. ...

2 years ago | 1 answer | 0

Question

How do I convert my cell array into a cell array of doubles?

Hi, I have a cell array of cells (see attachment) and need to covert each of the cells into numeric arrays for further processi...

2 years ago | 1 answer | 0

Question

How can I run PCA on a 3-dimensional cell arrays?

Hi, I have a cell array (see attachment) where each cell contains an array with 21 columns (variables). Each cell represents a ...

2 years ago | 1 answer | 0

Question

How do I run PCA on multiple cell arrays

Hi, I have a cell array (see attachment) where each cell contains an array with 21 columns (variables). Each cell represents a ...

2 years ago | 1 answer | 0

Question

Why do I get: "Error using sum Invalid option. Option must be 'double' " even though my variable is a double?

Hi, I have this for loop: n = numel(first_three); test_first_three = {}; for dd = 1:n test_first_three{dd} = sqrt(sum(...

2 years ago | 1 answer | 0

Question

How do I loop and save columns from a cell array as a double?

Hi, I have a cell of doubles array which contains 19 cells. I am looking to build a for loop which saves the first three column...

2 years ago | 1 answer | 0

Question

Why am I getting: Error using sum - Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'.

Hi, I have this for loop: n = numel(cell_of_doubles); distances_1 = cell(1,n); for dd = 1:n distances_1{dd} = sqrt(sum...

2 years ago | 1 answer | 0

Question

How do I extract column vectors from a cell of doubles array?

Hi, I have the cell of doubles array "cell_of_doubles" with 19 columns (19 cells). I am looking to extract only the first three...

2 years ago | 1 answer | 0

Question

Why am I getting the error "Brace indexing is not supported for variables of this type" when using cell of doubles?

Hi, I have code I am trying to run which isnt working anymore. The original version is this: for p = 1:length(file_list) ...

2 years ago | 1 answer | 0

Question

How to measure the euclidean distance of points continuously from point A to B (and point B to C)?

Hi, Currently, I have the following code, which I use to measure the euclidean distances from a 3-dimensional point to a refe...

2 years ago | 2 answers | 0

Question

How to include values starting from the nth instance of a value?

Hi, I have a data set where column 4 indicates a type of event. Columns 7-27 in this same data set are the raw data I am workin...

2 years ago | 1 answer | 0

Question

Why is my plot missing lines?

Hi, I have a matrix called comparisontable_abs and when I plot it using the plot() function, I get a plot which looks right but...

2 years ago | 1 answer | 0

Question

Best way to get rid of/ prevent function from creating complex numbers?

Hi, I have a function called dfaedit which somehow sometimes gives me complex numbers as outputs. I have not found a good way t...

2 years ago | 3 answers | 0

Question

How to apply function with arguments to every cell in cell array

Hi, I have a function called dfaedit which I want to run over each individual cell in a cell array called baskets_xyz_h_ref. H...

2 years ago | 1 answer | 0

Question

How to subtract contents of cells in cell array?

Hi, I am trying to get the euclidean distances from xyz coordinates (columns 1-3 of baskets_xyz cells) to a reference point (co...

2 years ago | 1 answer | 0

Question

How do I remove individual columns from each cell in cell array?

Hi, I have this cell array "baskets_data" where each cell contains a matrix that is 21 columns long. baskets_data = 19×1 ce...

2 years ago | 1 answer | 0

Question

How do I add a column of zeros to the end of a matrix inside a cell?

Hello, I have the cell "basket_xyz" and I would like balls_xyz{:,10} to only be zeros for the entire column or for the same len...

2 years ago | 1 answer | 0

Question

How do I correlate elements from two different cell array files?

Dear community, I have two cell array files. They are "distances_head_lefthand_windows" and "distances_head_righthand_windows"....

2 years ago | 1 answer | 0

Question

How to change a for loop code to run over columns instead of rows?

Hi, I have this piece of code which was used for a different project. %% and splits them into stride windows of length 512 dat...

2 years ago | 1 answer | 0