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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

Gesendet


ttplot(tt)
Stacked line plot for a timetable

mehr als 8 Jahre vor | 1 Download |

5.0 / 5
Thumbnail

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

fast 9 Jahre vor | 0

| akzeptiert

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 1

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 2

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 0

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

fast 9 Jahre vor | 3

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

fast 9 Jahre vor | 0

Mehr laden