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. ...

12 mois il y a | 1 réponse | 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...

12 mois il y a | 1 réponse | 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 ...

12 mois il y a | 1 réponse | 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 ...

12 mois il y a | 1 réponse | 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(...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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) ...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 2 réponses | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 3 réponses | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 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"....

environ un an il y a | 1 réponse | 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...

environ un an il y a | 1 réponse | 0

Question

How do I apply distance formula for 3D coordinate points for all elements in a cell array?

Hi, I have a cell array where each cell contains a matrix of 3D coordinates (xyz) for three positions (9 columns in total). The...

environ un an il y a | 1 réponse | 0

Question

How do I calculate the distance between 3D coordinate points using cell array?

Hi, I am trying to find the distances between pairs of 3D coordinate points. I have a cell array as my data set. Inside each ce...

environ un an il y a | 1 réponse | 0

Question

How to remove NaNs from rows in matrices within a cell array?

Hi all, I have this cell array participant _H where some of the matrices inside the cells include NaNs. When I try and remove a...

environ un an il y a | 1 réponse | 0

Question

How do I find the index of the first occurance of a string in a cell array?

Hi, this seems to be a bit harder than I originally thought. I am looking for occurances of events which are tracked by strings...

environ un an il y a | 1 réponse | 0

Question

How to get average for each row in a cell array containing multiple matrices?

Hi, I have a cell array 19x21 called Hurst (see attachment) where each row contains differently sized cells. These cells contai...

environ un an il y a | 1 réponse | 0

A répondu

How can I change input of function from file to cell array?

Beautiful! Many thanks! Sorry one last thing, I promise! When running this code the resulting cells are saved in a single row r...

How can I change input of function from file to cell array?

Beautiful! Many thanks! Sorry one last thing, I promise! When running this code the resulting cells are saved in a single row r...

environ un an il y a | 0

Question

How can I change input of function from file to cell array?

Hi, I have this function dfaedit_2('filename.csv',0,0,0) and it only takes files as input. I have a cell array with a size of 1...

environ un an il y a | 2 réponses | 0

Question

How to use cellfun with a function that has multiple arguments?

Hi, I have the function dfaedit_2 which takes three arguments: H = dfaedit_2(0,0,0) Now, I want to run this fucntion on ever...

environ un an il y a | 1 réponse | 0

Question

Error using reshape function when trying to split columns into equally sized columns in new cell array

Hi, I have a cell array (participants) with 19 cells (one cell for each participant). Within each cell there is a matrix with 2...

environ un an il y a | 1 réponse | 0

Question

Error using reshape when creating a new cell array in a loop

Hi, I have a cell array with 19 cells. Within each cell there is a matrix with 21 columns. Now I want to loop a piece of code o...

environ un an il y a | 1 réponse | 0

Question

Error when indexing 3D cell array: Index in position 2 exceeds array bounds

EDIT: more details provided by myself in the second comment Hi, I have a cell array with 19 cells. Within each cell there is...

environ un an il y a | 1 réponse | 0