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

quasi 9 anni fa | 0

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

quasi 9 anni fa | 0

| accettato

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

quasi 9 anni fa | 1

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

circa 9 anni fa | 0

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

circa 9 anni fa | 2

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

circa 9 anni fa | 1

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

circa 9 anni fa | 1

| accettato

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

Risposto
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'...

circa 9 anni fa | 0

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 1

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

circa 9 anni fa | 2

| accettato

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

circa 9 anni fa | 1

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

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

circa 9 anni fa | 1

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

circa 9 anni fa | 1

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

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

circa 9 anni fa | 2

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

Carica altro