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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 2

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

Mehr laden