Answered
Table array with numerical row names
The variable names in a table not only need to be text, they also need to be valid MATLAB identifiers (as do the field names in ...

8 years ago | 0

Answered
Extracting specific time points from two different time vectors
I suspect you will be happier using datetime and the isbetween function. Actually, it's hard to tell from your description, If a...

8 years ago | 0

Answered
How to calculate series of values by specifying starting time using datenum????????
You need to specify a step size. But you'll likely be much happier using datetimes: >> starttime = datetime(2018,03,23,10,...

8 years ago | 0

Answered
Datetime missing milliseconds values showing up as Nat
Anthony, it's not clear what your starting point is. If you have a file, some of whose rows contain timestamps with ms, some wit...

8 years ago | 0

Answered
Converting Excel dates into MATLAB while accounting for Leap Days
your example is not very clear to me. My advice is to use readtable, not xlsread, and use datetimes, not datenums. Beyond that, ...

8 years ago | 0

Answered
Undefined function 'eq' for input arguments of type 'table'.
Data(:,1) is an Nx1 table, and tables don't have math r relational operators defined on them. You need to compare the first vari...

8 years ago | 0

Answered
Error with rowfun with time table as input
mean is a function that takes one (data) input, and I imagine your timetable has more than one variable. I suspect you need to l...

8 years ago | 0

Answered
How can I create a new column in a table via if function?
Another possibility, similar to David's solution: T3DHM18.charger = T3DHM18.kW + 150*(T3DHM18.kW<=400) The problem with ...

8 years ago | 1

Answered
How to take an average by date
Put your data in a timetable, then use retime, with 'mean'. It's one line: >> tt = timetable(datetime(2018,3,23,1:12:71,0,0...

8 years ago | 1

Answered
Computing average absolute time from date strings without years
It's really just three lines to do this. I've shown scalar values, but it works just as well on string or cellstr arrays: >...

8 years ago | 1

| accepted

Answered
datetime array concat not diplaying time of day when first element is NaT
What's going on is that you are concatenating four scalar datetimes, and the display format of the result is coming from the fir...

8 years ago | 0

Answered
Remove and clear things in a table for presentation
Martin, the display you get for a table is aimed at showing the data in the same way as those variables would be shown if they w...

8 years ago | 0

| accepted

Answered
I have a question about tables
It sounds like you want to use discretize to create a new variable in the table. Something like t.z = discretize(t.x,...)

8 years ago | 0

Answered
Is there any equivalent to lag function for non-regular timetable?
I think that by, "without having to retime them", you mean retime to a regular time vector. If what you want is to create a v...

8 years ago | 0

Answered
Error using writetable: expect input to be one of these types
which -all write But I think you're going to have to post a SMALL example of a table for which you see this error.

8 years ago | 0

Answered
how can I filter the nth character from categorical?
If you have a categorical variable, as in the categorical data type, then it sounds like you want to work with the category name...

8 years ago | 0

Answered
convert categorical to numeric
Calling categorical is a data conversion, so c = categorical([12 12 13]) completely throws away the numeric values. In ...

8 years ago | 2

Answered
group excel data based on time and add a new matrix
OK, I'll take a guess: data collected in 2010, tagged with Excel serial day numbers? Read the spreadsheet in using readtable....

8 years ago | 0

Answered
plot the data from excel file with 3 variables on x-axis(gyr X, gyr Y, gyr Z) and one variable on y-axis(time)
I have no idea what kind of "time" 1.98961E+14 is supposed to represent (nanoseconds since a bit over 2 days ago? milliseconds s...

8 years ago | 0

Answered
extract start and end of a timerange
Andrei, you can't currently do that. You'd have to keep around the original endpoint values and create a new timerange.

8 years ago | 0

| accepted

Answered
Filtering data in a table according to the number of times an observation is repeated
findgroups/splitappy, and varfun with instrument as a grouping variable for that matter, _would_ solve this, but here's perhaps ...

8 years ago | 0

Answered
How to create a table from a bigger table based on category ?
You probably do _not_ want to do that, but there's not enough information to go on. In any case T2 = T(T.C == 'somevalue...

8 years ago | 0

| accepted

Answered
readtable and table2array
Depending on what you are doing after you read in the spreadsheet, you may not need to convert to one numeric array. You might, ...

8 years ago | 1

Answered
assign content into an empty timetable based on timerange variable
A timerange subscripter does not specify times, it only specifies a range of times. Presumably you have in mind some specific se...

8 years ago | 0

Answered
Removing weekends and holidays from a TimeTable
Weekends is simple: TT = TT(~isweekend(TT.Time),:) % assumes the default name, Time, for the row times Holidays are anot...

8 years ago | 0

| accepted

Answered
How to remove all rows from categorical variable corresponding to a double array?
You might find this more expressive, and it doesn't require the original vectors, which you may have chosen to delete afer putti...

8 years ago | 1

Answered
Get means for nested categorical variables
Another possibility: >> T2 = varfun(@mean,T,'GroupingVariables',{'site' 'days'}) T2 = 6×4 table site days...

8 years ago | 1

Answered
How to convert numbers in the form yyyymm to dates in the form mm/dd/yyyy
Assuming the values you have are really numeric values... There is a "canned" conversion form yyyymmdd, but regrettably not o...

8 years ago | 1

Answered
How to convert a datetime vector to a cell in the form M/D/YYYY
Walter has given the correct answer to your question, but it's likely that you do not need to convert the datetime to text, unle...

8 years ago | 0

Answered
How do I get correct dates for seasonal sst data (JJAS) using datenum function?
Unless you are using a fairly old (< R2014b) version of MATLAB, don't use datenums. Use datetimes: >> datetime({'01-Jun-198...

8 years ago | 0

| accepted

Load more