Answered

What’s wrong?

Is this what you want ? Works fine. t = 0:1/6000:1/30 v = (4*cos((120*pi*t) + (pi/3))) plot(t,v)

What’s wrong?

Is this what you want ? Works fine. t = 0:1/6000:1/30 v = (4*cos((120*pi*t) + (pi/3))) plot(t,v)

3 meses ago | 0

Question

How to subsample a dataset per week

Hi, I would like to subsample a dataset in such a way as to keep only the data that was collected on the first sampled day of t...

3 meses ago | 1 answer | 0

Question

How to transform multiple sets of coordinates in a csv file into a single shapefile

Hi, I was wondering what was the easiest way to transform the coordinates of multiple polygons in a csv file into a single shap...

4 meses ago | 1 answer | 0

Question

How to conditionally merge rows in a table

Hi, I have a quick question - I have the following table T and I would like to merge the rows where the values of the variabl...

4 meses ago | 1 answer | 0

Question

How to replace leading zeroes by spaces with regexprep

Hi, I have a basic question. I simply need to replace the leading zeroes by empty spaces in table T except for the last zero wh...

10 meses ago | 3 answers | 0

Question

How to duplicate the number of rows in a table based on frequency

Hi, I have a frequency table like this where N is the number of occurences: id = [1004, 1004, 1004, 1004]'; length = [23, 45,...

11 meses ago | 1 answer | 0

Question

Fastest way to replace NaNs by empty cells in a table

Hi, I need to replace the NaNs in the columns a and b by empty cells. The code below works but it is pretty slow. Is there a fa...

11 meses ago | 1 answer | 0

Question

How to reformat a table

Hi, My problem is very straightforward: i need to transform T1 into T2. What is tricky about this (in my mind anyway) is that s...

11 meses ago | 1 answer | 0

Question

How to condionally keep unique rows in a table

Hi, I have the following table T and I would like to keep only the rows that are unique based on the combination of the variabl...

12 meses ago | 1 answer | 0

Question

How to modify decimal places when exporting data with fprintf

Hi, I have a mixed-type table T that I want to export as a txt file. But I also need to change the number of decimals of T.d to...

12 meses ago | 2 answers | 0

Question

How to do basic time arithmetic when NaNs are involved

Hi, I have the following table and I simply want to calculate the elapsed time between start and end points. My main problem is...

12 meses ago | 1 answer | 0

Question

Fastest way to read mixed-type and position-delimited text files

Hi, I need to convert mixed-type text files that are position-delimited into cell arrays. To do this, I have a reference file w...

alrededor de 1 año ago | 1 answer | 0

Question

How to use ismember to assign values from one cell array to another cell array

Hi, I have two cell arrays of unequal lengths x = {'C', 'A', 'B', 1; 'C', 'A', 'B', 1; 'C', 'A', 'B', 2; 'B', 'A', 'D', 5} ...

alrededor de 1 año ago | 1 answer | 0

Question

How to conditionally delete columns in a cell array

Hi, I have a simple cell array that look like this: input = {'A','B','A','A','A','A','A','A'; 'A','A','B','A','A','A','A','A'...

alrededor de 1 año ago | 2 answers | 0

Question

How to replace values above a given percentile by nans

Hi, I am trying to replace values above the 99th percentile in a table by nans by using Star Strider excellent little function ...

más de 1 año ago | 2 answers | 0

Question

How to reshape every cell in a structure

Hi, I am trying to reshape every cell in a 1x4 structure with 10 fields. A simplified example would look like this but when I t...

más de 1 año ago | 1 answer | 0

Question

How to reshape nested cell arrays in a table

Hi, How does one reshape nested cell arrays in Matlab ? Let's say I have something like this: t = table({1:24}, {1:48}, {1:48}...

más de 1 año ago | 2 answers | 0

Answered

How to convert cell to cell array of character vectors.

Thank you all for your input.

How to convert cell to cell array of character vectors.

Thank you all for your input.

más de 1 año ago | 0

Question

How to subset a table with character elements

Hi, I have a very basic question I would like to understand. Lets say we have a basic table like so: year = {1994, 1994, 1994,...

casi 2 años ago | 2 answers | 2

Question

How to obtain the unique combinations of two columns in a table

Hi, I am trying to obtain all the unique combinations of two columns in a table. Lets say we have the following table: year = ...

casi 2 años ago | 1 answer | 0

Question

How to decompose and expand a vector into ones

Hi, How would you decompose and expand a vector in Matlab ? I might not be using the right terminology but let's I = [2, 2]' ...

casi 2 años ago | 2 answers | 0

Answered

How to count the number of unique elements by group in a table

I found the answer in an earlier post (https://www.mathworks.com/matlabcentral/answers/418060-count-unique-id-occurrences-in-a-c...

How to count the number of unique elements by group in a table

I found the answer in an earlier post (https://www.mathworks.com/matlabcentral/answers/418060-count-unique-id-occurrences-in-a-c...

casi 2 años ago | 0

| accepted

Question

How to count the number of unique elements by group in a table

Hi, How can I count the number of unique elements by group in a table and save the answer in a vector ? % Create table name =...

casi 2 años ago | 2 answers | 0

Question

How to change the dimensions of a structure

Hi, I have a structure that looks like this: % Create table Name = {'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'}.'; Month = ...

casi 2 años ago | 1 answer | 0

Question

How to use Alternative Box Plot

Hi, I dont have the Statistics and Machine Learning Toolbox and I was wondering if anyone knew how to use the alternative box p...

casi 2 años ago | 1 answer | 0

Question

How to make a cell array of cell arrays

Hi, How does one make a cell array of cell array in Matlab ? Let's A = (1:70), how can I transform this into a 14x1 cell array ...

casi 2 años ago | 3 answers | 0

Question

How to convert cell to cell array of character vectors.

Hi, So I have a basic table that looks like this but has over 60 000 rows: A = [48.44, 48.16].'; B = ['A', 'B'].'; C = table...

casi 2 años ago | 2 answers | 0

Question

How to extract a structure from a nested structure

Hello, I have a nested structure that look like this: % Create table Name = {'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'}.'; ...

casi 2 años ago | 1 answer | 0

Question

How to assign points to multiple polygons using inpolygon

Hi, I am having some difficulties assigning points to multiple polygons. Lets say I have a table with the polygons information:...

casi 2 años ago | 2 answers | 0

Question

How to declare variables in a function

Hi, I am curious as to why the variables 'user' and 'pass' are not recognized by Matlab in the following snippet. When the user...

casi 2 años ago | 1 answer | 0