Respondida
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 >>...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 4

Respondida
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' ...

más de 11 años hace | 0

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

más de 11 años hace | 2

Respondida
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 ...

más de 11 años hace | 0

Respondida
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: ...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 2

Respondida
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...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 2

Respondida
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...

más de 11 años hace | 0

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

más de 11 años hace | 0

Respondida
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. ...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 3

Respondida
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 ...

más de 11 años hace | 11

| aceptada

Respondida
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...

casi 12 años hace | 0

Respondida
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); ...

casi 12 años hace | 0

Respondida
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...

casi 12 años hace | 0

| aceptada

Respondida
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...

casi 12 años hace | 0

Respondida
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...

casi 12 años hace | 0

Respondida
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...

casi 12 años hace | 1

| aceptada

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

casi 12 años hace | 0

Respondida
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...

casi 12 años hace | 1

| aceptada

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

casi 12 años hace | 0

| aceptada

Respondida
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 ...

casi 12 años hace | 0

Respondida
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...

casi 12 años hace | 0

| aceptada

Respondida
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...

más de 12 años hace | 0

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

más de 12 años hace | 0

Cargar más