Community Profile

Contact

Top 1% contributor

Julian, as you noticed, MATLAB R2013b includes two new array types known as tables and categorical arrays. These are very simila...

accepted

3

Answered 1 year ago

93 downloads

5 years ago

Jesse, have you tried using a table rather than a dataset? A table is, roughly speaking, a replacement for dataset that is avail...

2

Answered 9 days ago

AND, no offense intended, but this doesn't make a lot of sense to me. I suspect you know the following: randn draws from a st...

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

1

Answered 8 days ago

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

Answered 3 months ago

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

Answered 4 months ago

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

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

Answered 7 months ago

Guanfeng, the problem is that you're initializing the map property in the properties block, and the value you're initializing wi...

Rishav, I suspect the problem is that your data has a weeknum for which there is only one row. You'll need to specify 1 for the ...

dav, as long as you're using a fairly recent version of MATLAB, the rng function is what you want to use. For reproduceability, ...

Answered 2 years ago

Christian, the kmeans functions uses a randomly-chosen starting configuration: >> help kmeans kmeans K-means clustering...

Pat, thresholded distributions are typically not easy to fit by maximum likelihood. I am not sure of the details for a 3-param ...

There are a few things to note about these two histograms. They have (at least approximately) the same mean. They are both (at...

Hsinho, you may be asking for this: >> rng shuffle >> s = rng s = Type: 'twister' Seed: 1066045100 ...

Josie, since you have two variables, it sounds to me like you are not fitting a gamma PDF, but rather that you are fitting a cur...

Answered 3 years ago

There _is_ an easier way: DS.Properties.VarNames{3} = 'NewName'; DS.Properties holds the array's metadata: variable and ...

This [p2,c2]=mle(r,'cdf',cdf_norm); is not a valid syntax for the MLE function (for two reasons, but I'll assume you lef...

Another possibility: >> s = 'MEQNGLDHDSRSSIDTTINDTQKTFLEFRSYTQLSEKLASSSSYTAPPLNEDGPKGVASAVSQGSESVVSWTTLTHVYSILGAYGGPTCLYPTA...

Answered 2 months ago

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

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

Functions accompanying MATLAB News&Notes article "Monte-Carlo Simulation in MATLAB Using Copulas"

19 downloads

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

Answered 2 days ago

The following are also possible: Rename only some variables (note the parentheses on the left-hand side and the cell array of...

Answered 14 days ago

Most likely you have (what are supposed to be) numeric columns in the file that contain strings like 'NA' or '.', which readtabl...

Answered 23 days ago

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

0

Answered 30 days ago

cgo, it may be that you have created a variable called "rand" in your workspace that is shadowing the rand function. The rand fu...

Andreas, I think the categorical times method is you're looking for: >> tab = table(categorical({'true','false','false','nu...

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

Answered 5 months ago

Load more