답변 있음
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 >>...

대략 11년 전 | 1

| 수락됨

답변 있음
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...

대략 11년 전 | 4

답변 있음
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' ...

대략 11년 전 | 0

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

대략 11년 전 | 2

답변 있음
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 ...

11년 초과 전 | 0

답변 있음
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: ...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 2

답변 있음
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...

11년 초과 전 | 1

| 수락됨

답변 있음
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...

11년 초과 전 | 1

답변 있음
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...

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 2

답변 있음
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...

11년 초과 전 | 0

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

11년 초과 전 | 0

답변 있음
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. ...

11년 초과 전 | 1

| 수락됨

답변 있음
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...

11년 초과 전 | 3

답변 있음
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 ...

11년 초과 전 | 11

| 수락됨

답변 있음
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...

11년 초과 전 | 0

답변 있음
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); ...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 1

| 수락됨

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

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 1

| 수락됨

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

11년 초과 전 | 0

| 수락됨

답변 있음
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 ...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 0

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

12년 초과 전 | 0

더 보기