Answered
How to convert to datenumber from two cell values
In any case, if you are using a recent Version of MATLAB (R2014b or later), consider moving to datetimes, not datenums: >> ...

8 years ago | 0

| accepted

Answered
How to sum a specified portion of a column in a data table?
SS's answer works, but if you are doing this on only ONE variable, this is much simpler: C = sum(B.VarName(31:57); where...

8 years ago | 3

Answered
Time Format: import unique format to be able to plot
I'm gonna guess that you've stripped away most of the context in the interests of asking a specific question. Usually that's goo...

8 years ago | 1

Answered
import and plot dated time series
As Akira says, use readtable and plot. In recent versions, readtable will create a datetime variable automatically, in earlier v...

8 years ago | 1

Answered
what is the best way to plot dates?
It would be good to post data that people can simply cut and paste. You have 11 pairs of repeated dates, and what appears to ...

8 years ago | 1

Answered
Analyse table value for calculations
Like Eric, I will observe that your example seems wrong, and it's not at all clear what you are starting with and what you want ...

8 years ago | 0

Answered
Logical result false when comparing 2 identical times
The extension of the file you've posted does not match your code. The file you've posted appears to be a .xlsx file. Add :ss....

8 years ago | 1

| accepted

Answered
How to Compare datetimes with milisecs?
This has nothing to do with milliseconds, at least not if what you posted is what you are actually doing. I don't know what y...

8 years ago | 0

Answered
Logical indexing: Find row in table by text in column
Two other things worth considering: 1) if {'hi', 'bye'; 'don', 'tcry'} are always unique, consider making them row names. The...

8 years ago | 0

Answered
How to display the value of an enumeration in a table, as opposed to a 1x1 array of the enumeration class?
Simon, I forget exactly what release (I'm guessing R2016a or b), but sometime after tables were originally released in R2014b, t...

8 years ago | 0

Answered
Reading in data and plotting the sunrise/sunset time of different dates against the time.
As Jan points out, the real question here was the plotting. Since this was originally answered six years ago, in versions of MAT...

8 years ago | 0

Answered
Merge a timedate table with a normal table
You are trying to concatenate a 5x2 datetime array with a 5x2 table. You do not have a timetable and a table. As dpb says, I ima...

8 years ago | 0

Answered
Compare two tables with two column combinations
tables have all the same "set membership" functions as numeric arrays: >> t1 = table({'a';'b';'c';'c';'a';'b'},{'d';'e';'d'...

8 years ago | 1

| accepted

Answered
Changing class of the variables in the table - I can't get it to work without a loop
Pawel, the only way to change the type of a variable in a table is to overwrite it. Assigning with t(:,vars) = ... or t{:,vars} ...

8 years ago | 1

| accepted

Answered
Date format changes at midnight
In recent versions of MATLAB, don't use xlsread or datenum. Use readtable, which will create a datetime in the table, without th...

8 years ago | 2

| accepted

Answered
How to extract row intervals from a table to create a new one.
Walter interpreted "all the columns from b and d rows" as "FROM b TO d". I'm going to interpret it as "b AND d". If the first...

8 years ago | 0

Answered
Extract a range of data acording to the date range from a table
There's only four seasons, best to not overthink this. spring = t(ismember(month(t.Time),1:3),:); etc. But Guillaume's a...

8 years ago | 0

| accepted

Answered
How to call/create column variables from changeable table?
I think what you are looking for is either data1 = data(:,{'S' 'Al' 'Si' 'Ca' 'Fe'}) or data1 = data{:,{'S' 'Al' 'S...

8 years ago | 1

| accepted

Answered
Insert of discontinuous dates/time (yyyymmddhhmm) to the first column and filling of NAN to the second column which missing unknown field
In recent versions of MATLAB: >> t = readtable('Tide.txt','ReadVariableNames',false); >> t.Properties.VariableNames = {'...

8 years ago | 0

| accepted

Answered
Extract data from table starting at a certain position
It sounds like maybe you have a table (the MATLAB data type) with multiple rows for each patient, and you want to split the data...

8 years ago | 0

Answered
converting num to date on the xaxis in Matlab R2016a
I think the problekm here is that plot typically puts ticks to show "nice" values in the range of your data, while you are looki...

8 years ago | 0

Answered
Aggregate time table for working hours
Behi, your code is telling retime to create all those rows. I think you have three options: # Just delete the rows of SyncedD...

8 years ago | 1

Answered
Excel dates into separate variables
Unless you're using a fairly old version of MATLAB, I recommend using readtable and datetimes. It might go something like this: ...

8 years ago | 0

| accepted

Answered
How do I parse and erase from a string while importing CSV with tableread?
Fixing the names in the importOptions setting is one choice, but an alternative might have been to patch up the names after read...

8 years ago | 0

Answered
Import date data from excel
Unless you are using an older version of MATLAB, you are likely much better of using readtable to read your data into a table, c...

8 years ago | 0

| accepted

Answered
Hi all, I want to write a code that assign new column to the table. For example, I have a column like:
Part of this question has nothing to do with tables, the other part does: 1) Not sure how 50 comes from Forest,B, but let's a...

8 years ago | 0

Answered
How do I convert a cell array of character strings into datetime array efficiently?
There is a more elegant way, and stop calling me Shirley. The thing you're passing into datenum, c{6:end,1}, is a list of val...

8 years ago | 0

| accepted

Answered
How can I create a single header for two columns for a table?
One possibility is ConfidenceInterval = [LowerBound,UpperBound]; T = table(AlpaParameter,ConfidenceInterval,'RowNames',I...

8 years ago | 0

Answered
Convert timetable with some mixed text representing numbers to all numeric for retime function
Matt, you have not said where that timetable came from. I think you want to fix this at the cause. Typically, you'll get text wh...

8 years ago | 0

Answered
How do I reformat a mixed format data file to work with readtable()?
In recent versions of MATLAB, you can use detectimportoptions to get more control over what gets read from where. But you may en...

8 years ago | 0

| accepted

Load more