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

10 mois il y a | 1 réponse | 0

1

réponse

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

10 mois il y a | 1 réponse | 0

1

réponse

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

10 mois il y a | 1 réponse | 0

1

réponse

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

10 mois il y a | 1 réponse | 0

1

réponse

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

10 mois il y a | 1 réponse | 0

1

réponse

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

11 mois il y a | 2 réponses | 0

2

réponses

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

11 mois il y a | 1 réponse | 0

1

réponse

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

11 mois il y a | 1 réponse | 0

1

réponse

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

11 mois il y a | 3 réponses | 0

3

réponses

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

11 mois il y a | 1 réponse | 0

1

réponse

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

11 mois il y a | 1 réponse | 0

1

réponse

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

11 mois il y a | 1 réponse | 0

1

réponse

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

11 mois il y a | 1 réponse | 0

1

réponse

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

12 mois il y a | 1 réponse | 0

1

réponse

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

12 mois il y a | 1 réponse | 0

1

réponse

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

12 mois il y a | 1 réponse | 0

1

réponse

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

12 mois il y a | 1 réponse | 0

0

réponse

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

12 mois il y a | 1 réponse | 0

1

réponse

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

1

réponse

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

1

réponse

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

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

2

réponses

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

0

réponse

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

1

réponse

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

1

réponse

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

1

réponse

Question


Save multiple columns of multiple csv files?
Hi, I have the following code: [file_list, path_n] = uigetfile('.csv', 'Grab csv', 'Multiselect', 'on') columns(); if ismatr...

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

1

réponse

Question


How to import files in bulk and loop over them
Hi, I am working with a large data set with csv files for different participants. I have a multilayered issue I am looking to ...

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

1

réponse

Question


How do I add a column to an existing matrix?
Hi I have this code here: [m,n] = size(windows); H = zeros(n,1); for i = 1:n r = windows(:,i); H(i) = dfaedit(r,1,1...

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

1

réponse

Question


How do I loop a fucntion over matrix columns and store the results in a column?
Hi, I have an issue writing a while loop correctly. I have a variable (R) with values that are stored in a matrix full of colum...

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

1

réponse

Charger plus