Answered
Writing data type calendarDuration to Excel?
Aram, Excel's notion of time is more or less equivalent to a datenum in MATLAB (with a different offset). In other words, a coun...

8 years ago | 0

Answered
Creating index from datetime vector days
discretize does this for you: >> dt = datetime(2017,1,1:10:100)' dt = 10×1 datetime array 01-Jan-2017 ...

8 years ago | 0

Answered
How to convert a datenum to a datetime?
Star Strider's answer seems like the long way around. JFz, it always helps to provide a short concrete example so people don't h...

8 years ago | 1

Answered
Separate date and time
>> dt = datetime dt = datetime 15-Nov-2017 23:54:20 >> t = timeofday(dt) t = duration 23:54:2...

8 years ago | 0

Answered
changing minutes after midnight into a datetime array
datetimes are dates+times. As Walter says, unless you also have a set of dates, or you want 'today', then you likely want a dura...

8 years ago | 0

Answered
Datevec problem - not able to convert string to numeric array
Stephen's mod of Andrei's answer looks right, but I would add that there is likely no need to call datevec. In other words, you ...

8 years ago | 0

Answered
How to insert date and time data into a matrix?
This is what tables (or in your case, probably, timetables) are for: mixed-type data. In recent versions of MATLAB, you should b...

8 years ago | 0

Answered
How to set default values for a datetime plot?
"datetime values that do not appear in my array" includes a very large number of possibilities. Presumably you have some regular...

8 years ago | 0

Answered
joining non uniform and uniform tables with a datetime
It's not clear what you mean by, "insert the non-uniform data into the uniform set". Yopu might mean what Steve thinks you mean....

8 years ago | 0

Answered
Table data grouping, ordering and recording duplicates
Most likely, you want to use rowfun with a grouping variable and a function of your own design to reconcile the duplicate rows.

8 years ago | 0

Answered
How do I instert a string in all rows of a table columnI
You are trying to assign a variable with one row to a table with 100 rows. Scalar expansion doesn't apply here, because you have...

8 years ago | 1

Answered
How can I create a table to work with, from this .txt?
You have a TAB delimited file, with three fields. The format you are telling readtable to use has FOUR variables in it. StarStri...

8 years ago | 0

Answered
plot three variables of table
Also, you may find it more appealing to type T.B,T.C,T.D rather than using braces. Braces are best used when you meed more than ...

8 years ago | 1

Answered
What is the code to add one row above in table?
My first observation is that if your table has only one variable, you are likely better off not using a table. They are containe...

8 years ago | 0

Answered
replacing a row of an existing table with nans
In _recent_ versions of MATLAB, you can do this: >> t = table([1;2;3],["a";"b";"c"]) t = 3×2 table Var1 V...

8 years ago | 0

Answered
grouped difference between two tables
With one grouping var, you can get the correspondence between rows using ismember. Given that, you can get the differences using...

8 years ago | 0

Answered
splitapply table for zscore
splitapply is more for computing scalar summaries. Try using varfun, with a grouping variable, returning a table. Something like...

8 years ago | 0

| accepted

Submitted


ttplot(tt)
Stacked line plot for a timetable

8 years ago | 1 download |

5.0 / 5
Thumbnail

Answered
If else calculation problem in table
This is almost certainly better done _without_ a loop, but it's hard to tell what you are doing. Something like i = finalCS...

8 years ago | 0

| accepted

Answered
Date conversion, works for one set but not the other, why?
Chameleon, two things: 1) unless yopu have a reason to use datenum and datestr, use datetimes. In fact, you're call to dateti...

8 years ago | 0

Answered
How can I create a table from column from another table and some model output?
It may be that you don't want to create a new table. If the dates are all the same, then it seems like there's a 1:1 corresponde...

8 years ago | 1

Answered
AppDesigner Converting Table Data to Categorical Supported?
Without meaning to contradict David, a cell array is only one of many different inputs that the categorical function will accept...

8 years ago | 0

Answered
How do I take a table which has one value for every hour and produce an average for hours X:Y, one for each day?
Using timetables, retime makes this simple. It sounds like you want an average for each day only considereing the values between...

8 years ago | 0

Answered
Conversion of {} in () with cell2table
It's impossible to say for sure what is happening because all you've posted is a screenshot. My best guess is that you started w...

8 years ago | 0

Answered
How to convert decimal to time?
This depends on what you mean by "time". Likely, the most useful thing is a duration: >> t = hours(7.6) t = durati...

8 years ago | 2

Answered
divide cell array into date and time columns
Think about using datetime and duration instead of datenum: >> dt = datetime({'30/12/2015 15:54:30';'30/12/2015 15:54:30';'...

8 years ago | 0

Answered
Cell array filtering date and time using datenum
Think about using datetime and duration instead of datenum: >> dt = datetime({'30/12/2015 15:54:30';'30/12/2015 15:54:30';'...

8 years ago | 0

Answered
I have a data set of dates from 1926 to 2016, and I want the data set to only contain values/dates from 1962 to 2016, how do I do this?
>> d = datetime(1926,1,1) + calyears(randi(2016-1926,10,1)) d = 10×1 datetime array 01-Jan-1945 01-Jan-19...

8 years ago | 0

Answered
Set specific date ticks
If you have access to R2016b or later, you will probably be much happier using datetime rather than datenum/datestr, including f...

8 years ago | 3

Answered
I have a large table with over 13,000 rows, each row represents an experiment and containins a set of genes. I would like to get generate a list of all the genes and the number of experiments that contain that gene. For example:
+1 for Guillaume's use of rowfun. Here's another possibility that might be wiorth looking at if you have very large number of...

8 years ago | 0

Load more