Risposto
Condense repeating values in table into one cell
You may have other reasons for reshaping your data, but it's easy to compute those means without doing so: >> monthDates = ...

quasi 8 anni fa | 0

| accettato

Risposto
Reshape table by rows, then merge horizontally and new var names
Unstack: >> t = table([1;1;1;2;2;2;3;3;3;4;4;4],[1;2;3;1;2;3;1;2;3;1;2;3],[1;2;3;4;5;6;7;8;9;10;11;12]) t = 12×3 ta...

quasi 8 anni fa | 2

| accettato

Risposto
Storing and accessing large amounts of time-based data
Consider this: >> x = rand(100,5); >> c1 = mat2cell(x,100,[1 1 1 1 1]) c1 = 1×5 cell array {100×1 double}...

quasi 8 anni fa | 1

Risposto
Filtering timeseries with NaN
You might take a look at isoutlier and filloutliers.

quasi 8 anni fa | 0

Risposto
Locating variables across multiple tables
How's this: >> dogs = categorical(["Spike";"Mr. Dog";"Chow";"Spike";"Chow";"Mr. Dog";"Spike";"Chow";"Mr. Dog";"Charlie"]); ...

quasi 8 anni fa | 0

| accettato

Risposto
Combine multiple tables into one so that it can be write into one excel sheet
You can combine the tables, but if you have different variables in each one you'd have to fill in large chunks with missing data...

quasi 8 anni fa | 0

Risposto
pltoting a variable with dates on horizontial axis
If possible, use datetimes, not datenums. Jonas' answer seems good, except I think it isn't correct when dealing with the non-st...

quasi 8 anni fa | 1

Risposto
Converting dates into numbers
Unless you're using a fairly old version of MATLAB, consider using datetimes instead of datenums. You will be happier. >> x...

quasi 8 anni fa | 0

Risposto
Combine Timetable's
Perhaps tt12 = [tt1; tt2] i.e., just like any other MATLAB array.

quasi 8 anni fa | 0

Risposto
Duration in double between two datenum
If possible, don't use datenum. Use datetimes: >> fmt = 'yyyy-MM-dd HH:mm:ss.SSS'; >> dur = datetime('2018-09-07 18:36:0...

quasi 8 anni fa | 3

Risposto
Combine variables in workspace into one table?
If you created those variables in the workspace, surely you could have created them in a table to begin with? t = table(); ...

quasi 8 anni fa | 0

Risposto
Storing and accessing large amounts of time-based data
Ben, I'm coming to this post a bit late, and I don't think I have a silver bullet for you, but I wonder if I can get you to say ...

quasi 8 anni fa | 0

Risposto
Averaging data with slightly different time values
Stephan's is an interesting and powerful approach. Alex, what you described in your question is a good deal simpler. Tak a look ...

quasi 8 anni fa | 1

Risposto
How to display a Localized Time of a specific city?
Also, the timezones function will pop up a browser window with all your choices for time zones. It's kind of interesting reading...

quasi 8 anni fa | 0

Risposto
How to solve floating point problem with datenum
The real answer is, use datetime if at all possible, because this kind of floating point issue doesn't exist in datetime (at lea...

quasi 8 anni fa | 1

Risposto
how can i convert duration type to datetime type??
As posed, this question is equivalent to, "how do I convert 1 hour to a date?" As SK points out, you also have to answer, "1 hou...

quasi 8 anni fa | 1

Risposto
Initialise a table which contains a structure and a sub-structure
Max, there are perfectly good reasons for wanting to put a struct inside a table, and yours may be one of them. But you might al...

quasi 8 anni fa | 0

Risposto
Look-up table row and assign values to individual variables
If the names are unique, make them row names. JohnsData = allData('John',{'Age', 'Height'}) or perhaps allData{'John',{'...

quasi 8 anni fa | 0

Risposto
struct2table produces different results when I use it on different struct files
I can't really tell what's going on here, but often problems with struct2table are cleared up by this: >> help struct2table...

quasi 8 anni fa | 0

Risposto
How to do matching in table format?
b = (A2.col2 == 2); % or A2{:,2) == 2 c = A(b,:) % leave this as a table d = A2; d.Col2(b) = 200; % or d{b,2}...

quasi 8 anni fa | 0

| accettato

Risposto
Correcting timestamp from netCDF
>> time = [23627 23627.0069444444 23627.0138888889 23627.0208333333]; >> dt = datetime(1950,1,1,'Format','dd-MMM-yyyy HH:mm...

circa 8 anni fa | 1

| accettato

Risposto
How can I calculate the delta time for each line?
Beginning in R2018a, you can convert directly to durations: >> duration(["15:27:02.563904" "15:27:02.815706" "15:27:03.0670...

circa 8 anni fa | 0

Risposto
How to calculate mean frequency and amplitude between a period of a particular time interval.
I'm guessing you want to use readtable, convert the result to a timetable using table2timetable, and then either use a timerange...

circa 8 anni fa | 0

Risposto
I have some big data file and I'm trying to plot them against date and time, I used the code below but it's not working for me at all. All I was is an x axis that has a point every 15 minutes.
I'm not exactly sure what you want, but in recent versions of MATLAB: >> x = datetime(2018,8,3,0,0,86400*sort(rand(10,1)));...

circa 8 anni fa | 0

Risposto
Error using datevec (line 212) Failed to lookup month of year.
Better still: do what Jan suggests, but create a datetime, not a datenum. Actually, with datetime, you can probably avoid a l...

circa 8 anni fa | 0

Risposto
How to reverse datenum?
The longer answer is, Don't use datenum and datestr at all if you can avoid it. Use datetime, no conversion back and forth betwe...

circa 8 anni fa | 0

Risposto
Import date, time together with candlestick data for Candlestick chart
Your file has hundreds of empty lines in it, Ive removed them. Try this: >> t = readtable('EURCADecn15.csv'); >> t.DateT...

circa 8 anni fa | 0

| accettato

Risposto
How do I read a text file and convert the dates and time?
It's likely that you want to read the file using readtable, and if you are using a recent version of MATLAB, you will get dateti...

circa 8 anni fa | 0

Risposto
How to use 'setvartype' to get the variable as 'datetime' formatted as: yyyy-MM-dd
Pawel, if I understand your question correctly, this is just a display issue. The datetime in the middle and right images are th...

circa 8 anni fa | 0

Risposto
How to extract Jan and feb dates from an array of date strings?
If possible, don't do this with text. Convert to datetimes: >> d = datetime(2018,randi(6,10,1),1) d = 10×1 datetim...

circa 8 anni fa | 0

Carica altro