Answered
Specify format when using readtable() to read spreadsheet .xlsx?
Cell arrays are the standard way to store strings in MATLAB. You may or may not be asking about character matrices, but you real...

9 years ago | 0

| accepted

Answered
Datetime from Unix time miliseconds
It's not entirely clear to me what you're starting out with. "unix time" isiusually measure in seconds since 1970, you may have ...

9 years ago | 3

Answered
Delete rows if the column has weekend date
'date' and 'time' aren't really types in MATLAB, so it's not clear what you have. I'm guessing you have a cell array, the first ...

9 years ago | 0

Answered
How can i generate month and year strings for Datetime vectors?
To create _numbers_ use the Year and Month properties of a datetime >> d = datetime+calmonths([1;2;3]) d = 03-Sep...

9 years ago | 0

Answered
how to put dates in x-axis in subplots?
James, if you're using R2014b or later, you should try using datetime, not datenum. There's plotting functionality built around ...

9 years ago | 0

Answered
Search in two columns (Tables)
I'm not 100% sure I've understood the operation you want to do, but it sounds like you want to find the rows in table 2 whose ex...

9 years ago | 0

Answered
How to Manipulate Values in the Table
You could do it with rowfun, here's another way. First make your data friendlier: >> t = table([1;2;3;4;5],[1;1;0;0;1],cate...

9 years ago | 0

| accepted

Answered
Add header to my new extracted data from a table?
mahrukh, there are much simpler ways to do this, especially your use of subscripting. For example: data = readtable('my_fil...

9 years ago | 0

| accepted

Answered
Setting mixed table data as empty
Callum, it's possible that passing things like isnumeric into varfun as the 'InputVariables' parameter would help, although I'm ...

9 years ago | 0

Answered
append table to a exist csv file
Marco, it's quite possible (you don't provide enough info to know for sure) that the reason why your table is so big is because ...

9 years ago | 0

| accepted

Answered
Align Two Data Sets by Date and Location Where Both Data Sets Are Missing Data Points at Random Dates and Locations?
Dylan, if I understand your description correctly, this is a pretty classic example of an outer join: First cook up some fake...

10 years ago | 1

| accepted

Answered
Creating table of fints from tall table of various financial data
Josh, I think you mean varfun (no 'c'), right? The function you pass into varfun should take exactly one input - varfun works on...

10 years ago | 0

Answered
Bug? Datetime creation produces both NaT and 1-Jan-1970 values.
Erik, that does appear to be a bug. You are making an indexed assignment to only some elements of a datetime array that does not...

10 years ago | 1

| accepted

Answered
Struct 2 table conversion error
The error message says it all: to convert a scalar struct to a table, the fields all have to be the same number of rows. However...

10 years ago | 0

Answered
How to convert datetime
You're going to need to say what those two numbers, which differ by *15 orders of magnitude*, are supposed to represent. The fir...

10 years ago | 0

Answered
How do I apply calculations on a table of cells? Why are my double numbers recognized as cells?
Others may already (almost) said this, but the problem is that you are taking a cell array of strings and working on it one cell...

10 years ago | 0

Answered
Importing HH:MM:SS from excel
datestr is the (old) command to create strings that represent dates and times. So that's why you have a char array. If you impor...

10 years ago | 4

| accepted

Answered
How to change time stamp to readable date and time without giving reference time ?
When I do this >> datetime('08-Feb-2016 10:28:52','Format','dd-MMM-yyyy HH:mm:ss.SSSSSSSSS') - seconds(1.454956105656222e+9...

10 years ago | 0

Answered
How to split a column in a table into two columns by a space
If the variable in your table is literally a datetime, and not a cellstr containing datestrs, then you'll want to split them uin...

10 years ago | 0

Answered
Significant figures in table
For numeric variables, tables respect the long/short precision of the current command window setting, but do so using either for...

10 years ago | 0

Answered
How to convert a series of number representing dates into into plottable values?
Assuming you're using R2014b or later: If you read them from the file as strings, you can turn those strings into datetimes a...

10 years ago | 0

Answered
How can I create a table from variables (DATA, ColumnNames)
Joe, you may be happy with where you ended up, but I'm not sure it's the best way. You said: _"The data (DATA.m / double) ...

10 years ago | 0

| accepted

Answered
Datetime with variable format
Winston, I recommend that you NOT mix datenum and datetime. If you're in R2014b or later, don't use datenums. Among other things...

10 years ago | 2

Answered
access data from a table
Jenny, "datetime" is a datatype in MATLAB since R2014b. It appears that you are not using that, and that what you're calling "Da...

10 years ago | 0

Answered
How to find cell match in matlab table and exctract data from table
Gert, no offense intended, but it's your data format that I would describe as "awful". Using StarStrider's code, Here's the firs...

10 years ago | 0

Answered
How to pre-allocate table rows
Danial, I interpret your question as "I have a table with one row. I'd need the same table, but lengthened to 10 rows so that...

10 years ago | 7

| accepted

Answered
CSV Date time error
Dan, your description is a little light on details. Assuming you have data like a bigger version of this ... timestamps = ....

10 years ago | 0

Answered
Loss of precision with netcdf time when using datenum
Mashtine, I'm not super familiar with netCDF, but "365 day format" and this >> dt = between(datetime(2005,11,26),datetime(2...

10 years ago | 0

Answered
Different R squared from fitlm and corrcoeff?
Diana, you're comparing two different things, though they are related. See, e.g. <https://en.wikipedia.org/wiki/Coefficient_of_d...

10 years ago | 0

| accepted

Answered
What is the best way to concatenate arrays of different types (matrices and cells of strings or numbers) into a table to be saved in txt file (for Matlab R2011a)?
Under simple conditions, writetable just does what you want: >> N = 3; >> a = [zeros(N,1) ones(N,1)]; >> b = [repmat(...

10 years ago | 0

| accepted

Load more