Respondida
How to get the index from a datetime array corresponding to a time duration?
There are many ways to do this, I bet. Here's one: >> bin = floor((t2 - t1) ./ minutes(5)) + 1; >> i2 = [find(diff(bin)>...

más de 9 años hace | 0

Respondida
Find missing days in a date vector matlab
Meriem, if you're using a version of MATLAB since R2014b, you might find using tables and datetimes make this pretty simple: ...

más de 9 años hace | 0

Respondida
Fill area in plot with datetime
Frank, if you have access to the most recent release, R2016b, area does now work with datetimes: area(X,Y); h = gca; h.X...

más de 9 años hace | 1

Respondida
importing excel file time format
In R2014b or later, assuming you have a cell array of strings for the date and a vector of doubles for the time, >> datetim...

más de 9 años hace | 1

| aceptada

Respondida
express datetime from now, every 3h
In addition to Walter's suggestions, it may also be possible to take advantage of the roll-over behavior of the datetime constru...

más de 9 años hace | 0

| aceptada

Respondida
How can I convert these numbers into a date for a table?
There's also an explicit conversion to datetime from numbers like that: >> data = table((20160105:101:20161101).','Variable...

más de 9 años hace | 2

Respondida
How to specify a default fill value for adding to table
Greg, it's really the double type that's doing the in-filling with zeros, not the table. In general, things in a table behave th...

más de 9 años hace | 1

Respondida
How can I store a table inside a matrix?
As Nidhikutty says, if you want to split data into hourly (?) tables and keep all of those in one container, you'll need to stor...

más de 9 años hace | 1

Respondida
Sorting time series data by category
Let's say you're starting with the spreadsheet version of something like this: Time,Species,Size,Direction 10/25/2016 10...

más de 9 años hace | 0

| aceptada

Respondida
Converting a time field in a table to a usable format
Assuming you're starting out with something like this >> x = [1;2;3]; >> t = {'11:59:59:795'; '11:59:59:936'; '12:00:00:...

más de 9 años hace | 2

| aceptada

Respondida
How to detect whether 72 hours have passed after the occurrence of a certain event? - datenum gives error for longer time series.
Unless you're using a version of MATLAB older than R2014b, you'll be much better off using datetimes: >> times = datetime(2...

más de 9 años hace | 0

Respondida
table dispaly with char array
You're using a char array, almost certainly not what you want for a variety of reasons. Mostly, char matrices require awkward pa...

más de 9 años hace | 0

| aceptada

Respondida
How do I count the days of week in an hourly data set using datetime function?
Use dateshift, something like this: uniqueDays = unique(dateshift(dateNovLowVis,'start','day')) Then extract whatever co...

más de 9 años hace | 0

| aceptada

Respondida
Table performance very slow
Byron, it's hard to make specific suggestions without knowing exactly what you're doing, but here are some thoughts. Tables a...

casi 10 años hace | 0

Respondida
Replace a missing string in a table
George's loop seems fine to me although you could tweak it a bit as for name = varNames var = A.name; if isce...

casi 10 años hace | 1

Respondida
getting data types of table
It seems like you want a list of the table's variable names, a list of the variable's types, and your 2xn cell array of names/ty...

casi 10 años hace | 11

| aceptada

Respondida
Aligning Columns of a Table
Most likely that you need to use a fixed-width font in your command window. MATLAB's default is a fixed-width font, perhaps you ...

casi 10 años hace | 1

Respondida
mean value for every one minute and time blanks between
There are a variety of ways to do this, all more or less involving creating a grouping variable that says what minute each row o...

casi 10 años hace | 0

Respondida
How can I Stack data in a Table
There's a function specifically to do this: stack. In this case, you are stacking two groups of variables, so it's not quite as ...

casi 10 años hace | 0

Respondida
Multiple x axes with datetime time series
plotyy will work for plotting against datetimes (with some rough edges prior to R2016b), but it sounds like you want to overlay ...

casi 10 años hace | 0

Respondida
Converting time/dates to hours or number
This doesn't help the OP (sorry obstac) who's using R2008a, but the same calculation using datetime: >> t1 = datetime('13-S...

casi 10 años hace | 1

Respondida
How to average data for each sample (taken every ten minutes) from 4pm to 6am the next morning for each day for 2 months?
Lauren, I'm not clear what problem you're running into. If you have access to R2016b (available today, by coincidence), I rec...

casi 10 años hace | 1

Respondida
How to just select the date in a date-time excel upload.
ymd is a method of datetime to return the year, month, and day components as doubles. yyyymmdd is a method to return the (trunca...

casi 10 años hace | 0

Respondida
Convert dates from Excel to Matlab
If you're using R2014b or newer, suggest you look into using datetime, which has explicit conversions to and from excel serial d...

casi 10 años hace | 0

Enviada


Mersenne Twister
Mersenne Twister uniform pseudo-random number generator.

casi 10 años hace | 1 descarga |

5.0 / 5

Respondida
Only one decimal place in a table object at the surface. How can I solve this problem?
Tables display with the same precision as the command window. Even in the command window, the only way to display exactly one de...

casi 10 años hace | 0

Respondida
how to convert data in UTC to a specific local time
UTC-5 is likely NOT your local time zone, since most locales shift for daylight saving. That's a detail many people forget. Y...

casi 10 años hace | 8

| aceptada

Respondida
Merging CSV files with similar data structure into table
Bjorn, you can create a table with three variables, full of NaNs, and then just assign the variables you have read in from each ...

casi 10 años hace | 0

| aceptada

Respondida
How can I find the average of Y values for a given X?
Two other possibilities that are very simple, using Azzi's example: 1) If you have R2013b or later, >> M = randi(10,100,...

casi 10 años hace | 1

Respondida
convert "Jul_26_2016__11-26-37_AM" to Date Vector
In R2014b or later, don't use datevec at all: >> s = {'Jul_26_2016__11-26-37_AM' 'Jul_26_2016__11-26-37_PM'} s = ...

casi 10 años hace | 0

Cargar más