Beantwortet
Read data from cell---structure--multiple fields to table
Not 100% sure of your description, but this might be what you want: >> for i=1:3, c{i} = struct('a',i,'b',100+i); end >>...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
How do I change a string or number in a table?
Mathilde, I think with that syntax, you just need to wrap that string in curly braces in order to assign it into a variable that...

mehr als 11 Jahre vor | 4

Beantwortet
How to reshape efficiently Panel Data
This is a one-liner using the unstack function on a table. It would be something like wideData = unstack(tallData,{'Price' ...

mehr als 11 Jahre vor | 0

Beantwortet
the number of occurences of each character of one string,in another
Another possibility: >> s = 'MEQNGLDHDSRSSIDTTINDTQKTFLEFRSYTQLSEKLASSSSYTAPPLNEDGPKGVASAVSQGSESVVSWTTLTHVYSILGAYGGPTCLYPTA...

mehr als 11 Jahre vor | 2

Beantwortet
kmeans works with some values of k and not works with other
If f1 is a binary matrix, then it certainly does make sense to cluster your data into more than two clusters. Each column of f1 ...

mehr als 11 Jahre vor | 0

Beantwortet
Select August data from a vector column in the format YYYYMMDD
Are the dates strings, or numbers? If you have access to R2014b, you could do either of these, depending on which you have: ...

mehr als 11 Jahre vor | 0

Beantwortet
Time of day deduction
If you have access to R2014b, the new duration data type will help: >> d = seconds(0:40:180) d = 0 secs 40 s...

mehr als 11 Jahre vor | 2

Beantwortet
how to get randomization seed ?
Joe, I think you want the random number state, not the seed. RNG will give you both. You description is a little vague, but I...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
random number generator to two different variables
cgo, it may be that you have created a variable called "rand" in your workspace that is shadowing the rand function. The rand fu...

mehr als 11 Jahre vor | 1

Beantwortet
Converting strcat to use with categoricals
Andreas, I think the categorical times method is you're looking for: >> tab = table(categorical({'true','false','false','nu...

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
Combining Date and Time variables (class - datetime) into 1 DateTime (class - double) array
Jenny, if you create datetimes from strings and don't specify the time portion, it defaults to midnight. If you don't specify th...

mehr als 11 Jahre vor | 0

Beantwortet
Processing a HUGE number of timestamps
none, I don't know if you have access to R2014b. If you do, consider using the new datetime data type. On a not so fast PC, pars...

fast 12 Jahre vor | 2

Beantwortet
Monthly average from time series with daily values
K_r1, if you have access to MATLAB R2014b, there are some new data types that make this more straight-forward: >> dt0 = dat...

fast 12 Jahre vor | 0

Beantwortet
How to union columns in the same Variable (Array) ?
I think you are looking for UNIQUE.

fast 12 Jahre vor | 0

Beantwortet
1-hour offset in time string conversion
Dennis, I'm guessing you're somewhere in Europe, and that Star Strider is somewhere in the western US. As in, UTC+1 and UTC-7. ...

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
Performance of table data type
Michael, table is currently not as fast as datatypes like double and cell when you are reading or writing individual values in a...

fast 12 Jahre vor | 3

Beantwortet
How to access the data type of the each column of a table
Ege, your question isn't all that clear. But I'm guessing that you don't want to be looping over every element of the table and ...

fast 12 Jahre vor | 11

| akzeptiert

Beantwortet
Converting Covariance Matrix to Correlation Matrix
Jim, if you mean, "matrix operations" as in "something out of a math book", then you can right and left multiply by diag(d), whe...

fast 12 Jahre vor | 0

Beantwortet
Checking if two random variables are statistically independent
Erin, consider the following analogy: generate 10 random values form a standard normal distribution. >> x = randn(10,1); ...

fast 12 Jahre vor | 0

Beantwortet
setdiff error in some cases
Neesha, this appears to be a bug when one of the datasets has zero rows and the other has exactly one. A valid edge case to be s...

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
Random Number Generation for Parallel Computing Toolbox
If I'm understanding correctly, the problem is that, just as with ordinary non-parallel MATLAB, the random numbers on each worke...

fast 12 Jahre vor | 0

Beantwortet
Creating a Matrix with Datenum column and a string column.
Davin, as others have said, you have a cell array. That's one way you can store data of different types in one array, but it may...

fast 12 Jahre vor | 0

Beantwortet
Difference between mvnrnd(,sigma) and randn()*chol(sigma)
Did you forget to reset the random number generator between the two calls? mvnrnd and randn draw random values from the same str...

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
access values in dataset
Slightly more direct than Mark's suggestion: Im.Coefficients.Estimates(1) gets you the estimated intercept as a scalar v...

fast 12 Jahre vor | 0

Beantwortet
Why the trigonometry results are different
1.6331e+16 is the right answer. Remember that pi/ is irrational. There is no way to represent it in double precision. The tangen...

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
Clever solution sought: Summing values from an array into a vector component given in a second array
I think you are looking for accumarray.

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
Can matlab functions return a table?
Asghar, in recent versions of MATLAB, there's a data type called "table". You may be asking about that. Here's a simple example ...

etwa 12 Jahre vor | 0

Beantwortet
Is there a way to plot original set of data onto biplot?
Michelle, the whole point of PCA is to create a new coordinate system. Plotting the original data in that coordinate system does...

etwa 12 Jahre vor | 0

| akzeptiert

Beantwortet
KSdensity 2D density histogram plot
It does make plots like the ones you pointed to, as demonstrated by the images on the FEX download page. You've provided no info...

mehr als 12 Jahre vor | 0

Beantwortet
KSdensity 2D density histogram plot
Rebecca, you might look at this File Exchange submission: http://www.mathworks.com/matlabcentral/fileexchange/13352-smoothhis...

mehr als 12 Jahre vor | 0

Mehr laden