Answered

I am trying to synchronize two tables, how do I do this to keep the date and time format?

Create example data bowData = [ "10/10/2020,20:37:00.00,426988.025,5830157.551" "10/10/2020,20:37:01.00,426988.027,58...

I am trying to synchronize two tables, how do I do this to keep the date and time format?

Create example data bowData = [ "10/10/2020,20:37:00.00,426988.025,5830157.551" "10/10/2020,20:37:01.00,426988.027,58...

1 year ago | 0

Answered

Converting an entire MATLAB table column from epoch to datetime format

It looks like we just need to change x = sleeponData(row,1); to the following x = sleeponData{row,1}; Note the use of curly ...

Converting an entire MATLAB table column from epoch to datetime format

It looks like we just need to change x = sleeponData(row,1); to the following x = sleeponData{row,1}; Note the use of curly ...

1 year ago | 1

Answered

Unstack aggegate function and preset fill value do not match

Thank you for clarifying. You can customize the fill value used in unstack by writing a custom aggregation function. "If t...

Unstack aggegate function and preset fill value do not match

Thank you for clarifying. You can customize the fill value used in unstack by writing a custom aggregation function. "If t...

2 years ago | 0

| accepted

Answered

Combining Rows of a Table based on Matching first column entry?

Check out innerjoin and outerjoin: https://www.mathworks.com/help/matlab/ref/innerjoin.html https://www.mathworks.com/help/mat...

Combining Rows of a Table based on Matching first column entry?

Check out innerjoin and outerjoin: https://www.mathworks.com/help/matlab/ref/innerjoin.html https://www.mathworks.com/help/mat...

2 years ago | 0

Answered

Creating a table with only headers

table has a preallocation syntax: table('Size', [2 4], 'VariableNames', ["Observations", "Mean", "Treatment", "Residual"], 'Var...

Creating a table with only headers

table has a preallocation syntax: table('Size', [2 4], 'VariableNames', ["Observations", "Mean", "Treatment", "Residual"], 'Var...

2 years ago | 2

Answered

Unstack aggegate function and preset fill value do not match

1. We highly recommend that you use datetime instead of datenum. Please let me know if you can't use datetime for some reason as...

Unstack aggegate function and preset fill value do not match

1. We highly recommend that you use datetime instead of datenum. Please let me know if you can't use datetime for some reason as...

2 years ago | 0

Answered

Table of Tables or cell of Tables

Hi Christopher, I had been trying to create a 1*13 table in which each table element was another table, however I cannot get ...

Table of Tables or cell of Tables

Hi Christopher, I had been trying to create a 1*13 table in which each table element was another table, however I cannot get ...

2 years ago | 0

| accepted

Answered

Table comparison [String - cell compare]

Take a look at the table functions innerjoin and outerjoin: https://www.mathworks.com/help/matlab/ref/table.join.html https://...

Table comparison [String - cell compare]

Take a look at the table functions innerjoin and outerjoin: https://www.mathworks.com/help/matlab/ref/table.join.html https://...

2 years ago | 1

Answered

How can I perform a set of calculations on multiple matrices located in a csv. file?

Take a look at the "Large Files and Big Data" section of the doc. This sounds like a good candidate for tall arrays. https://ww...

How can I perform a set of calculations on multiple matrices located in a csv. file?

Take a look at the "Large Files and Big Data" section of the doc. This sounds like a good candidate for tall arrays. https://ww...

2 years ago | 0

Answered

Is it possible to aggregate data in a timetable with a weighted daily mean?

Another way to approach this is to 1) Copy the timetable. 2) Shift the copied timetable's row times to the start of the day. ...

Is it possible to aggregate data in a timetable with a weighted daily mean?

Another way to approach this is to 1) Copy the timetable. 2) Shift the copied timetable's row times to the start of the day. ...

2 years ago | 1

| accepted

Answered

Calculate Mean Score of subjects

You can 1) find the mean across several variables using mean(t{:, ["Var1", "Var2", "Var3"]}, 2) 2) find rows that meet a certa...

Calculate Mean Score of subjects

You can 1) find the mean across several variables using mean(t{:, ["Var1", "Var2", "Var3"]}, 2) 2) find rows that meet a certa...

2 years ago | 0

| accepted

Answered

Combine data from multiple netCDF files

Take a look at the documentation for reading large files and big data. https://www.mathworks.com/help/matlab/large-files-and-bi...

Combine data from multiple netCDF files

Take a look at the documentation for reading large files and big data. https://www.mathworks.com/help/matlab/large-files-and-bi...

2 years ago | 0

| accepted

Answered

How to remove extra text from date and timestamp ?

We strongly recommend using datetime instead of datenum. As Star Strider mentioned, datetime allows you to specify the 'T' and '...

How to remove extra text from date and timestamp ?

We strongly recommend using datetime instead of datenum. As Star Strider mentioned, datetime allows you to specify the 'T' and '...

2 years ago | 0

| accepted

Answered

Does MATLAB Coder support DATEVEC, DATENUM, DATESTR, DATETIME, and other date-related functions?

Starting in R2020a, you can use datetime arrays in MATLAB code intended for code generation. For more information, see Code Gene...

Does MATLAB Coder support DATEVEC, DATENUM, DATESTR, DATETIME, and other date-related functions?

Starting in R2020a, you can use datetime arrays in MATLAB code intended for code generation. For more information, see Code Gene...

2 years ago | 0

Answered

Extracting values corresponding to exact date from a table and update it in another table on a same date

1) Convert your tables to timetables This isn't strictly necessary to answer your question, but is generally a good idea when w...

Extracting values corresponding to exact date from a table and update it in another table on a same date

1) Convert your tables to timetables This isn't strictly necessary to answer your question, but is generally a good idea when w...

2 years ago | 1

| accepted

Answered

How to call a variable from a string table and do subsequent operations, then save it as a new variable.

I would like to convert the string in variable 3 to numeric Take a look at sscanf. https://www.mathworks.com/help/matlab/ref/s...

How to call a variable from a string table and do subsequent operations, then save it as a new variable.

I would like to convert the string in variable 3 to numeric Take a look at sscanf. https://www.mathworks.com/help/matlab/ref/s...

2 years ago | 0

Answered

Concatenate tables with variable data types in columns

As Jon mentioned, we can set the variable type explicitly for those variables we know to be floating point numeric. file1 = "ts...

Concatenate tables with variable data types in columns

As Jon mentioned, we can set the variable type explicitly for those variables we know to be floating point numeric. file1 = "ts...

2 years ago | 0

Answered

datestr function Unrecognized month format error

We highly recommend using datetime in place of datestr, now, datenum, etc. You can get a datetime version of the same value usi...

datestr function Unrecognized month format error

We highly recommend using datetime in place of datestr, now, datenum, etc. You can get a datetime version of the same value usi...

2 years ago | 1

Answered

Split a target date interval into seasons and find the percentile of days for each season

To add to Scott's answer, this kind of grouped calculation on timestamped data lends itself well to timetable and groupsummary. ...

Split a target date interval into seasons and find the percentile of days for each season

To add to Scott's answer, this kind of grouped calculation on timestamped data lends itself well to timetable and groupsummary. ...

2 years ago | 1

Answered

Count frequency data from table

This can be accomplished using groupsummary and unstack. https://www.mathworks.com/help/matlab/ref/double.groupsummary.html ht...

Count frequency data from table

This can be accomplished using groupsummary and unstack. https://www.mathworks.com/help/matlab/ref/double.groupsummary.html ht...

2 years ago | 0

| accepted

Answered

Subset using time range following specific time

Two alternative workflows are Shift the midpoint and tolerance passed into withtol to achieve the desired range. Use logical s...

Subset using time range following specific time

Two alternative workflows are Shift the midpoint and tolerance passed into withtol to achieve the desired range. Use logical s...

2 years ago | 0

| accepted

Answered

How to plot monthly data for 31 years on the same plot?

It is probably easier to store the data in a timetable and use retime to get the monthly averages. https://www.mathworks.com/he...

How to plot monthly data for 31 years on the same plot?

It is probably easier to store the data in a timetable and use retime to get the monthly averages. https://www.mathworks.com/he...

2 years ago | 1

| accepted

Answered

How to assign corresponding label to dataset

We can create categorical arrays using the categorical function. https://www.mathworks.com/help/matlab/ref/categorical.html ...

How to assign corresponding label to dataset

We can create categorical arrays using the categorical function. https://www.mathworks.com/help/matlab/ref/categorical.html ...

2 years ago | 0

Answered

Assigning nested tables inside a parfor-loop

Adding to Walter's answer: The table constructor does not allow specifying the widths of individual variables when preallocat...

Assigning nested tables inside a parfor-loop

Adding to Walter's answer: The table constructor does not allow specifying the widths of individual variables when preallocat...

2 years ago | 1

| accepted

Answered

Calculate the Euclidean distance of simple combinations in a table

What have you tried? Where are you confused? You might want to take a look at the following documentation links: https://www...

Calculate the Euclidean distance of simple combinations in a table

What have you tried? Where are you confused? You might want to take a look at the following documentation links: https://www...

2 years ago | 0

| accepted

Answered

What is the best way to append double arrays while working in a loop?

You can append values to a table using concatenation as follows https://www.mathworks.com/help/matlab/matlab_prog/add-and-delet...

What is the best way to append double arrays while working in a loop?

You can append values to a table using concatenation as follows https://www.mathworks.com/help/matlab/matlab_prog/add-and-delet...

2 years ago | 0

Answered

Get variable value from imported text

Sounds like you could use readtable. https://www.mathworks.com/help/matlab/ref/readtable.html >> readtable('05-2350-33R.S20201...

Get variable value from imported text

Sounds like you could use readtable. https://www.mathworks.com/help/matlab/ref/readtable.html >> readtable('05-2350-33R.S20201...

2 years ago | 0

| accepted

Answered

Delete data from the following minutes from data that does not meet a certain condition

I believe the following post answers your question https://www.mathworks.com/matlabcentral/answers/402361-delete-rows-in-a-tabl...

Delete data from the following minutes from data that does not meet a certain condition

I believe the following post answers your question https://www.mathworks.com/matlabcentral/answers/402361-delete-rows-in-a-tabl...

2 years ago | 0

Answered

Moving vertical line as time marker

Check out the xline function, which lets you plot a vertical line as well as update its position. https://www.mathworks.com/hel...

Moving vertical line as time marker

Check out the xline function, which lets you plot a vertical line as well as update its position. https://www.mathworks.com/hel...

2 years ago | 0

Answered

Labelling columns of large array in a searchable way?

table supports custom metadata properties. https://www.mathworks.com/help/matlab/matlab_prog/add-custom-properties-to-tables-an...

Labelling columns of large array in a searchable way?

table supports custom metadata properties. https://www.mathworks.com/help/matlab/matlab_prog/add-custom-properties-to-tables-an...

2 years ago | 0

| accepted