Answered
Searching values in a dataset
Quite often, this is the kind of thing you'd do to pick out rows of a dataset array: >> load hospital >> hospital(hospit...

14 years ago | 0

| accepted

Answered
exponential random draws and the seed
etcann, It appears you are using MATLAB 2010a. That release pre-dates the introduction of RandStream.setGlobalStream, which is ...

14 years ago | 0

Answered
How to duplicate rand('twister', 0) in current Matlab?
Historically, using 0 as a seed for MATLAB's random number generators meant, under the hood, "use the special seed that MATLAB u...

14 years ago | 0

| accepted

Answered
Why are there repeated values from EXPRND?
Matt, without some concrete way to reproduce this, I don't know what to say. It sounds like what you're saying is that you cr...

14 years ago | 0

Answered
randsample issues and generating random numbers from large populations
Michael, if you are using the most recent version of MATLAB, R2011b, try this: >> tic, randperm(2^53-1,10), toc ans = ...

14 years ago | 1

Answered
Why are there repeated values from EXPRND?
Matt, I am confused. You seem to be saying something roughly equivalent to, "I generated a few hundred values using exprnd(8714...

14 years ago | 0

Answered
Random sample without replacement
As Andrew pointed out, randsample absolutely does do sampling without replacement, just not with weights. It looks like that's ...

14 years ago | 1

Answered
Why are there repeated values from EXPRND?
This is certainly possible for very extreme values of the mean parameter, because the "correct" values saturate to zero or Inf: ...

14 years ago | 0

Answered
Multivariate GLMFIT and GLMVAL
Francisco, it's pretty hard to say what's happening without knowing anything about the data or the model, but this may be an art...

14 years ago | 0

Answered
How can I add new column in a dataset array but not at the end?
Alexis, I am niot 100% sure from your description exactly what you are trying to do. I'm going to assume that you want to creat...

14 years ago | 0

| accepted

Answered
Deriving PDF from a given signal without using the hist() function?
Catarina, the pdf function (I assume this is the one in the Statistics Toolbox) evaluates a *known* PDF at a set of points. Tha...

14 years ago | 0

Answered
Error with mdscale
>> help mdscale mdscale Non-Metric and Metric Multidimensional Scaling. [snip] 'Start' - Method used to choose the i...

14 years ago | 0

Answered
How to freeze a random sample
Sophia, unless you are using an old version of MATLAB (R2008a or earlier, as I recall) you should not (NOT!) be using any of th...

14 years ago | 0

| accepted

Answered
Very small p value
Micah, in recent versions of the Statistics Toolbox, chi2gof will definitely compute very small p-values correctly. In older ve...

14 years ago | 0

Answered
random selection
There are a number of ways to do this, including Walter's suggestion. But in addition, if you have access to MATLAB R2011b, the...

14 years ago | 1

Answered
Efficient way to read in large dataset
Mads, you will most likely find that this: >> help dataset/dataset dataset Create a dataset array. [snip] DS = dat...

14 years ago | 0

| accepted

Answered
Convergence of lsqisotonic (in mdscale)
Shay, it kind of impossible to say what's going on here without knowing what's in the data. At each loop iteration, the lines ...

14 years ago | 0

Answered
Using accumarray to create histograms from random integers
Luke, I'm not exactly sure what you're asking, but as I interpret it, you want a single call to accumarray to create N sets of c...

14 years ago | 0

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

14 years ago | 1

| accepted

Answered
mle with cdf
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...

14 years ago | 1

| accepted

Answered
gamfit confidence intervals
GAMFIT fits the parameters on the log scale, on which the asymptotic normal approximation tends to need fewer observations to be...

14 years ago | 0

| accepted

Answered
Trouble with k means
Your desired result can't possibly be what you really want, it's not even the right length. I'm guessing you made the plot us...

14 years ago | 1

Answered
What does RANDPERM miss?
A couple of people in this thread have mentioned the Fisher-Yates-Durstenfeld(-...) shuffle algorithm. New in <http://www.mat...

14 years ago | 1

Answered
nominal array memory
Mike, I believe this has something to do with the intelligence that's built into cell arrays under the covers to not store multi...

14 years ago | 0

Answered
how do i create a dataset and save it. i need to create one with different types of data (char, double, int, T/F, etc.). how do i also save it and edit it for modification?
Since you refer to the Fisher Iris data, it may be that you have already seen the documentation in the Statistics Toolbox User's...

14 years ago | 0

Answered
Generating normal random numbers, difference between Mersenne Twister and other RNGs
Jan, this requires some details that almost noone needs to think about, but you asked. The Ziggurat algorithm, most of the ti...

14 years ago | 1