Respondida
changing 'daytime' data type to string string to export in excel
If the datetimes are in a table, writetable will just work: >> Date = dateshift(datetime,'start','second') + seconds(0:4)';...

alrededor de 11 años hace | 0

| aceptada

Respondida
Time series plots for a Project: Urgent
Another option, if you are using MATLAB R2014b or later, is this: Speed = [20 30 50 60]; Timestamp = ['12-Dec-2014'; '1...

alrededor de 11 años hace | 0

Respondida
how to convert 18 digits timestamp to readable date and time in MATLAB
Another option, if you have MATLAB R2014b or later, is this: >> x = [uint64(634019142119225390) uint64(634019142129597610) ...

alrededor de 11 años hace | 2

Respondida
How can I access variables inside a table inside a table?
As far as I can tell, you _don't_ have a table inside a table. You have a cell vector of tables. Nothng wrong with that, but it'...

alrededor de 11 años hace | 0

| aceptada

Respondida
making a result table
At a minimum, num2str(1:m) isn't going to generate a cell vector of strings, which is what the row names need to be. For example...

alrededor de 11 años hace | 0

| aceptada

Respondida
Read table using readtable with different number of spaces and delete unnesessary spaces
Thomas, if you provide a format string to readtable ('Format','%f%f%s%s%f' in your case, I think), you can also specify paramete...

alrededor de 11 años hace | 1

Respondida
Read timestamp from data file with mixed formats
Hadi, in R2014b, you have the right format string for %D. But as Per points out, you need R2014b to use %D. In R2014a, you can r...

alrededor de 11 años hace | 0

Respondida
Inserting a data (3 variables) into a MATLAB Table
Buck, you've said "MATLAB Table" which sounds like you mean the data type called table. But there's nothing involving tables in ...

más de 11 años hace | 0

Respondida
writetable change "Row" in cell A1
David, you can set the dimension names property, such as data.Properties.DimensionNames{1} = 'SomethingOtherThanRow'; Ho...

más de 11 años hace | 1

| aceptada

Respondida
Table "Vertical Lookup", how to do it?
It's not terrible clear what you're asking for. A simple example would have helped. It sounds like you want to do a join oper...

más de 11 años hace | 0

Respondida
Replace String with a NaN in table
It sounds like you imported a file where some of the columns were mostly numbers, but some strings mixed in. Best to avoid getti...

más de 11 años hace | 1

| aceptada

Respondida
Generating Distributions using the Pearson System
It's no different than asking, "why isn't mean(randn(1000,1)) exactly equal to 0?" You're confusing the moments of a distributio...

más de 11 años hace | 0

Respondida
Datenum: how many seconds in a day?
Just to summarize and expand on what several people have said: 1) The datenum, datevec, and datestr functions work strictly i...

más de 11 años hace | 0

Respondida
datetime 'UTCLeapSeconds', 2 second difference across leap sec boundary
James, in the second instance, you're subtracting 2012-06-30T00:00:24.000Z from 2012-07-02T00:00:25.000Z. There really is 86401+...

más de 11 años hace | 2

| aceptada

Respondida
Error reading text file using readtable
This T=readtable('file.txt',' ',[0 1]) is not the correct way to call readtable. I have no idea what [0 1] is intended ...

más de 11 años hace | 1

Respondida
I get an error when I try to add variable names to a table
The error that I get is Error using matlab.internal.tableUtils.makeValidName (line 36) 'sigma P' is not a valid variable...

más de 11 años hace | 0

Respondida
Why doesn't MATLAB's "readtable" honor the 'TreatAsEmpty' option for some strings in my Excel sheet?
A couple of other suggestions: * It may be that Col2 could usefully be converted to a categorical variable, at which point yo...

más de 11 años hace | 0

Respondida
Faster array comparison with big datasets
Given Stephen's interpretation of your code, and some similar data, here is a vectorized version that prints out * filenames ...

más de 11 años hace | 0

Respondida
Averaging monthly using accumarray for two arrays?
If you have R2014b or newer, this combination of table and datetime makes such grouped calculations fairly succinct: >> Dat...

más de 11 años hace | 1

| aceptada

Respondida
Faster array comparison with big datasets
KBK007, as Stephen said, your code is unvectorized, and that's why it is slow. It is also complicated enough that its purpose ki...

más de 11 años hace | 0

Respondida
Statistical Test for Random Number Generators
Branko, although many of those tests would be straight-forward to write in MATLAB, I don't know of anyone who's actually done th...

más de 11 años hace | 1

Respondida
read table in excel file and save under a different name
Damith, if you have a recent version of MATLAB (R2013b or newer), you should be able to read the spreadsheet with the readtable ...

más de 11 años hace | 0

Respondida
Problem with rng shuffle
As Sean said, don't reset the random number generator in a loop. There's no good reason to do it. You are NOT making your random...

más de 11 años hace | 1

| aceptada

Respondida
Using the new datetime structure within datasets
Jesse, have you tried using a table rather than a dataset? A table is, roughly speaking, a replacement for dataset that is avail...

más de 11 años hace | 3

| aceptada

Respondida
Generating Distributions using the Pearson System
This <http://en.wikipedia.org/wiki/Pearson_distribution picture on Wikipedia> illustrates what's going on: the normal is a point...

más de 11 años hace | 0

Respondida
Is it possible to rename columns in a table?
The following are also possible: Rename only some variables (note the parentheses on the left-hand side and the cell array of...

más de 11 años hace | 26

Respondida
How do I get the table to produce the results from vectors?
Just to clarify what's going on: Rich, your original code created a table from three 1x6 arrays. They all have the same numbe...

más de 11 años hace | 2

Respondida
How to convert nanoseconds timestamp to DateTime structure?
You say "nanoseconds", but you have not said "since when". So >> t = datetime('2014.08.29 05:35:19:7600000','Format','yyyy...

más de 11 años hace | 2

Respondida
What causes readtable() to read .csv files into a table with cell arrays instead of a table with numeric values
Most likely you have (what are supposed to be) numeric columns in the file that contain strings like 'NA' or '.', which readtabl...

más de 11 años hace | 1

Respondida
How do split columns of dates in the format 'dd mm yyyy hh:mm:ss' to get just hh:mm?
If you have access to R2014b, try this: >> datestrings = {'20 07 1872 13:22:16'; '01 03 2020 05:42:06'; '28 02 1999 12:00:0...

más de 11 años hace | 0

Cargar más