Answered
Table to array error
Ivan, by calling table2array, you are asking to put different data types into a homogeneous array. That isn't gong to work. I...

8 years ago | 0

Answered
Can anyone please help me to understand the following problem with converting a cell-array to a table?
Tobias, as puzzling as it may seem at first, cell2table is doing the right thing. t = cell2table(c) wants to take each column...

8 years ago | 0

| accepted

Answered
How to convert comma separated column to table?
The main problem is your file has a partial last line. Also you'll need to skip the two header lines. In a recent version of ...

8 years ago | 1

Answered
Merging data from different matrices with different row numbers by matching date
If you are using R2016b or later, timetable provides two really good ways to approach this. The second approach also works with ...

8 years ago | 0

Answered
How can I convert the number 1 into a date value 20150101 (yyyyMMdd)?
There's a datetime method for that: >> A = (1:731)'; >> d = datetime(2015,1,A) d = 6×1 datetime array 01-...

8 years ago | 2

Answered
Julian time and seconds
>> d1 = juliandate(datetime('today')) d1 = 2458017.5 >> d2 = d1 + 1234 d2 = 2...

8 years ago | 1

Answered
Use textscan to read dates with time zone
I think you want the <https://www.mathworks.com/help/matlab/ref/datetime.html#buhzxmk-1-Format x format token> . >> datetim...

8 years ago | 1

| accepted

Answered
Splitting up large arrays based on datetimes without using loops
Here's how you would do this using a table and varfun: >> t = table(datetime(2017,1,randi(365,20,1)),randn(20,1),'VariableN...

8 years ago | 0

| accepted

Answered
Converting date into date and hours
Use datetimes and durations: >> t0 = datetime('today','Format','yyyy-MM-dd HH:mm:ss') t0 = datetime 2017-09-...

8 years ago | 0

Answered
indexing to different table
It sounds like what you ultimately want is to compute statistics within groups on variables in a table. If that's correct, here'...

8 years ago | 0

Answered
how to plot histogram from table?
This doesn't really have anything to do with tables, you just want a histogram on discrete values. Use a categorical variable...

8 years ago | 0

| accepted

Answered
How to add dates to a read loop
Create a datetime column vector and assign it to your table. d = datetime(2012,3,repmat(1,24,1)) % assuming you mean march 1s...

8 years ago | 0

Answered
Entry new date when date is a different day from previous entry
You question is not described very clearly. It LOOKS like you want to split those start/end pairs into two pairs if they cross a...

8 years ago | 0

Answered
Index out of bounds (datetime)
You have a lot of code there, and a bunch of time calculations that apparently involve excel times and posix times. Potential fo...

8 years ago | 0

Answered
Using @range in timetable when having NaN's
Robert, it's not clear what you are looking for, or what you mean by "doesn't work". As KSSV says, range ignores NaNs, so it's n...

8 years ago | 0

| accepted

Answered
How to Synchronize timetable?
Ioannis, you'll need to provide a small, clear example of what you have and what you want.

8 years ago | 0

Answered
When I add columns to a table, it changes the assigned names to Var1, Var2 ...! How can I add columns to an existing table with the assigned names?
This Tab(:,{'B_X' 'B_Y'}) = table(B.L1(:,1),B.L1(:,2)) or this Tab(:,{'B_X' 'B_Y'}) = array2table(B.L1) or perha...

8 years ago | 1

Answered
How can I re-code numeric variables in a table to strings?
JLC, you say "string", but it's very likely that you would be bettter off with categorical variables. Given you're original samp...

8 years ago | 2

| accepted

Answered
storing tables in an array and calling them whithin a for loop
You've shown your data, but that can't possibly be output from MATLAB because 'AAPL' = is not something MATLAB would e...

8 years ago | 1

| accepted

Answered
How to extract variable data from a table
Hard to tell what you are doing because you have not said what elements or clusters is. It looks like you created your own wa...

8 years ago | 0

Answered
Index table with unrecognized row names
Row names in tables don't work like that in subscripting, but getting what you want is much easier than you think. Given this ta...

8 years ago | 0

Answered
convert datetime format to numeric format
While you asked to be able to convert timestamps strings into (partial) date vectors, you may find that if you convert your stri...

8 years ago | 1

Answered
How to extract time (HH:mm) from datetime from a table and plot it in interval range?
I'm not entirely clear what you are trying to do in this plot. It sounds like you want to plot things against time of day, not a...

8 years ago | 1

Answered
Setting time ticks in plot
The numbers in your example data don't match the numbers in your explanation: >> x = [ ... 27634517312999, 1.1111809...

8 years ago | 0

Answered
converting seconds to date in a plot
The answer depends on what version of MATLAB you are using. Using datetick with a plot of datetimes probably works prior to R201...

8 years ago | 0

Answered
How to average time data every 1/4 of hour?
Walter is right that retime on a timetable makes this almost a one-liner. But even pre-R2016b without timetables, you don't w...

8 years ago | 2

Answered
How do I combine two DateNumber strings without resulting in all NaN values?
You _say_ datenum, but you are using a format for _datetimes_. And in any case, datenum only accepts three fractional seconds di...

8 years ago | 0

Answered
How can i compute the mean of specific number of table rows?
Add a grouping variable to your table and use varfun. Something like n = ceil(height(t)/10); g = repelem(1:n,10)'; t....

8 years ago | 0

Load more