Réponse apportée
Pass 'cfit' object into a new function
You appear to be assigning [] to both X and Y, then fitting to that. I wouldn't expect that to work. However, if you are succ...

presque 13 ans il y a | 0

Réponse apportée
Anovan gives contradicting results
This is a balanced design, so the sum of squares explained by g1 is indeed the same in each case. But its F statistic and p-valu...

presque 13 ans il y a | 0

Réponse apportée
How to fix a singular design matrix created by LinearModel during categorical interaction expansion?
When I try an example like this I see: Warning: Regression design matrix is rank deficient to within machine precision. ...

presque 13 ans il y a | 0

Réponse apportée
What is 'cat' param used for in TreeBagger method
This means that column 6 of X is to be treated as categorical. Suppose it takes values 1,2,3. If X were continuous, splits would...

presque 13 ans il y a | 0

Réponse apportée
fminsearch combining maximum likelihood and least squares
If you use this function, fminsearch will try to minimize the first output. You could wrap "yourfunction" in a second function a...

presque 13 ans il y a | 0

Réponse apportée
dataset create categorical variables from existing variable
Start with this and see if it gets you anywhere: d = dataset; d.a = (ds=='a')

presque 13 ans il y a | 0

Réponse apportée
how to compute a linear mixed effect using nlmefit?
It looks like nlmefit invokes your model function with betas as a row vector. Try this: model = @(Betas,X) (X*Betas(:))

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Normalize histogram of normally distributed data
I would normalize it to area 1. The usual histogram has area equal to binwidth*sum(n), so divide by that. Probably binwidth=b(2)...

presque 13 ans il y a | 0

Réponse apportée
MATLAB kmeans clustering vector space
A couple of things to look at. First, norm(m) where m is a matrix returns a scalar. You seem to want a vector. Second, in your l...

presque 13 ans il y a | 0

Réponse apportée
How to implement cross validation with back propogation network
I am not a nnet expert, but I am under the impression that your inputs should have one column per observation (rather than one r...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Is it possible , to use NaiveBayes.fit prediction with crossvalind
The error comes from this: test(cp1,1) You're using cp1 to index into the logical vector test. I suspect you want someth...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
varimax rotation of PCs
On reflection, if you are thinking of the eigenvalues as the variances of the scores, perhaps this is what you want after rotati...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Estimating initial values for nlinfit or lsqcurvefit
If you expand out your expression, you'll see that you have a polynomial up to x^3, so there are four coefficients including the...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Canonical Correlation Analysis - canoncorr function in matlab
Try comparing V with the product bsxfun(@minus,Y,mean(Y))*B The first factor is just Y with the column means subtracted....

presque 13 ans il y a | 0

Réponse apportée
plot with grouping variables
I'm not clear what you mean by a "real" graph. If you want the points connected by lines, you can specify a linestyle after usin...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
calcuating expected value from a joint distribution
You don't say what errors you get. You could get problems if you are in a region where y is near zero. Away from that region,...

presque 13 ans il y a | 0

Réponse apportée
How can I draw Multivariate Scatter Plot?
You could use gscatter to plot two of them with coloring determined by the third. You could use plotmatrix or gplotmatrix to plo...

presque 13 ans il y a | 0

Réponse apportée
LS Estimates aren't accurate
It looks like you are fitting an AR(160) model. Aside from that, I can't figure out what you're trying to do. You appear to b...

presque 13 ans il y a | 1

Réponse apportée
generate a random number according to a probability distribution
Check out the datasample function, including its 'Weights' argument.

presque 13 ans il y a | 1

Réponse apportée
K-means without iteration
Not sure I follow exactly, but you could use grpstats to compute the coordinatewise means of data for each distinct value of T. ...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Undefined function or variable "idxBest" in kmeans
This looks like a bug. I can see it has been fixed in the toolbox source code for distribution in an upcoming release. From what...

presque 13 ans il y a | 0

Réponse apportée
LinearModel.fit - are the regression coefficient standardized?
I don't quite understand what you want. The coefficient estimates as shown are not standardized. The so-called "beta coefficient...

presque 13 ans il y a | 0

Réponse apportée
Flexible number of paramters for MLE with custom function
Let's try it. The normpdf function uses the default sigma=1 if no standard deviation value is given. >> x = 1 + randn(100,1...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
p-value returned by non-paraemtric test
Type "help kstest" and you may see (if your MATLAB is recent enough) that there's a 'Type' option to control whether it's one-ta...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Generating dataset from Gaussian Mixture Model
It's multivariate in the sense that it supports more than one dimension, but you can use it for a single dimension: g = gmd...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
how to remove a bar from histogram which drawn using 'hist' function?
If you want to omit zeros from the bar calculations: hist(h(h~=0), 6) Depending on your data, this may omit the bar that...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
The function nlinfit is not found
The nlinfit function is part of the Statistics Toolbox. Try typing "ver" to see if this toolbox is among the ones you have avail...

presque 13 ans il y a | 0

Réponse apportée
mvtcdfqmc error when mvncdf used within fsolve
When I try this, it's because H becomes negative and so log(A_t./H) becomes complex. You may find it helpful to set a breakpo...

presque 13 ans il y a | 0

Réponse apportée
error message in using mvnrnd function??
Using chol is a good idea, but chol does not actually check that the matrix is symmetric: >> a = [2 1;1 3] a = 2...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
How can I find t-statistics for parameters a, b of a function f = 1 / (a.log(x)+b) using matlab?
Do you have a recent version of the Statistics Toolbox available? >> load census >> d = dataset(cdate,pop); >> nlm = ...

environ 13 ans il y a | 0

Charger plus