Answered
KNN classification
You asked this in another posting. See my answer there.

14 years ago | 0

| accepted

Answered
Gaussian Mixture Model
If you have the Statistics Toolbox, try help gmdistribution

14 years ago | 0

Answered
calculating euclidean distance
It is likely that you have assigned D to some value, perhaps a plain numeric value, earlier in the function. So it is not a cell...

14 years ago | 1

Answered
Ridge regression coefficient question
Good question! This took a while to figure out, and I can see the help text is not clear about it. The calculations are actually...

14 years ago | 0

| accepted

Answered
k-NN search. What is the difference between these 2-codes ?
You have supplied only x, not [x z], as the first argument to knnsearch. Your newpoint vector, on the other hand, has two column...

14 years ago | 0

| accepted

Answered
Addition of gaussian noise
I don't know anything about ecg signals, but "help randn" will show you how to generate Gaussian noise.

14 years ago | 0

Answered
can someone help me to fix this error(Error using ==> kmeans at 382 An empty cluster error occurred in every replicate)
Type "help kmeans" and look at the description of the 'EmptyAction' parameter. Maybe that will help.

14 years ago | 1

| accepted

Answered
Logistic mixed-effect regression example
You could use NLMEFIT to fit a response with normally distributed errors around a curve with a logistic shape. But there is no f...

14 years ago | 0

Answered
how to define link function in glmfit
Did you really mean to specify the normal distribution? This type of link is more commonly used with the binomial distribution. ...

14 years ago | 0

Answered
log-likelihoods from mnrfit; testing proportional-odds model
You are correct about the "dev" output. Here's an illustration using the "help mnrfit" example. I can calculate the binomial log...

14 years ago | 0

| accepted

Answered
WBLFIT with Zeros
Suppose you record times to 0.01. Would it be reasonable to replace the zeros by 0.005 or some other number that would round to ...

14 years ago | 0

Answered
cdfplot
Also not 100% sure, but consider using the ECDF function and plotting however you want. Also you could use those outputs with a ...

14 years ago | 0

Answered
Principal Component Coefficients in princomp
The princomp function works on the centered data (variance/covariance matrix), so you need to remove the mean to reproduce the s...

14 years ago | 0

| accepted

Answered
Interaction plot of medians
It is true that interactionplot wants all factor combinations present. Here's a little script that will plot medians as function...

14 years ago | 0

| accepted

Answered
Is there any implemetation of the post hoc Nemenyi test in matlab?
Sorry, I'm not aware of an implementation of that test. I hope someone else may have one. In the Statistics Toolbox, the mult...

14 years ago | 0

| accepted

Answered
Type III sum of squares for all predictors using regstats
Aloha. You've run into the issue that regstats doesn't want to do anova, and anovan wants to treat its x variables as categorica...

14 years ago | 0

| accepted

Answered
P-value from nlinfit
For a function like f = @(b,x) b(1) + b(2)*x.^b(3); you might be interested in the p-value for a test of whether coeffic...

14 years ago | 0

| accepted

Answered
nlinfit not accurately modeling data
In your model function you have "1/<stuff>" where you almost certainly intended element-by-element division, "1./<stuff>". You'l...

14 years ago | 0

| accepted

Answered
finding slope/intercept/std.deviation of replicates
You can just include the x value once for each y value. If you're just talking about least squares coefficient estimation (no st...

14 years ago | 1

Answered
Combinations of variables and step sizing for creation of DOE
Do you have the Statistics Toolbox available? It seems like what you want is a full factorial design, but with the variable leve...

14 years ago | 1

Answered
regress and stats
One problem is that the model you fit is not the same as the "model" value you computed afterward. Or maybe the "x3" was just a ...

14 years ago | 0

Answered
Multivariate GLMFIT and GLMVAL
Consider the code below. It fits a multi-predictor model, but plots the fit as a function of one predictor at a time, with the o...

14 years ago | 0

| accepted

Answered
Vertical boxplot?
Could it be that you want to use the 'positions' argument? rowvals = [1 2 4 8]'; x = bsxfun(@plus,rowvals,randn(4,20)); ...

14 years ago | 2

Answered
How does one use output from mnrfit to forecast nominal values
You can use the mnrval function to compute fitted probabilities, then take the category with maximum probability. Here's an exam...

14 years ago | 0

Answered
Control Chart from SQL query results
If the column is a series of measurements taken over time, with no particular grouping to them, then there are charts like the "...

14 years ago | 0

| accepted

Answered
Custom distribution in Distribution Fitting Tool
Konstantinos, I am not sure but here are some things to check. First, you create an options structure and supply it to mle like ...

14 years ago | 0

Answered
Custom distribution in Distribution Fitting Tool
Konstantinos, this does not indicate a bad fit, as no preliminary fit is attempted. Distributions could be ruled out if they are...

14 years ago | 0

| accepted

Answered
Trouble with NaiveBayes object in Statistics toolbox (R2010a)
I would not expect this to be a problem unless your path was set up in an unusual way. If I type "which nansum" I see the stats ...

14 years ago | 0

Answered
Trouble with NaiveBayes object in Statistics toolbox (R2010a)
This is odd. it appears to be having trouble concatenating mu and sigma, which came out of these two earlier lines: mu ...

14 years ago | 0

| accepted

Answered
Generate DoE matrix and test plan
Phillippe, you are right that the Statistics Toolbox offers a collection of DOE tools rather than a beginning-to-end DOE applica...

14 years ago | 1

| accepted

Load more