MATLAB is a high-level language and interactive programming environment developed by MathWorks. It is the foundation for a number of other tools related to statistical analysis, including Statistics Toolbox, Optimization Toolbox, Curve Fitting Toolbox and Neural Network Toolbox.

learn more… | top users | synonyms

0
votes
0answers
9 views

How to make zero-mean random noise with standard deviation equal to 1?

Now I'm trying to make a equation within MATLAB. the equation which is zero-mean random noise with standard deviation equal to 1 How to make zero-mean random noise with standard deviation equal to 1 ...
0
votes
0answers
10 views

find weights of different methods

This question is a little general, but I am looking for suggestions of a method. I have several images that contain images of animals and I have to characterize which animals they are, let's call them ...
1
vote
0answers
17 views

An Algorithm for Maximal Correlation

Given a pair of random variables $(X,Y)$ over a product space $\mathcal{X}\times \mathcal{Y}$, the maximal correlation coefficient is defined as ...
0
votes
1answer
22 views

Application of PCA in clustering [on hold]

How can I use results of principal component analysis (PCA) from Matlab in a clustering algorithm written in Java? The results of the clustering algorithm are unsatisfactory at higher dimensions, so ...
2
votes
1answer
46 views

Is PCA still done via the eigendecomposition of the covariance matrix when dimensionality is larger than the number of observations?

Disclaimer: I understand that this question has been answered on CV, but I am asking about the particular implementation, which AFAIK, is not answered yet. I have a $20\times100$ matrix $X$, ...
1
vote
2answers
34 views

How to use an optimization solver to get t-stats and p-values for the estimates?

I calculate a data log likelihood (evaluated at a set of parameters to be estimated), and my task is to find the set of parameters that maximize my log likelihood. My problem is: thought there are a ...
0
votes
0answers
13 views

I am new to matlab and I have noticed that many matlab programs start with the code global data. What does this mean? [on hold]

How does the code global data support the rest of the codes in a matlab program?
0
votes
0answers
15 views

Is there any reason that cross correlation would perform well or poorly on sparse binary arrays?

I am using matlabs xcorr to correlate simulated photon count data that has some Gaussian random noise set on top of it and it is working fine when the average value in the arrays is greater than one ...
0
votes
1answer
41 views

Create and save an 'R-file' like one does for m-files in Matlab [on hold]

I'm brand new to R, but proficient with Matlab. The following is probably a very silly question. In Matlab one writes a program or function and then saves it as an m-file, sat myfile.m, in Matlab's ...
0
votes
0answers
12 views

Interpret Kernel Density Estimation for Clustering

I would like to use KDE to cluster 1 dimensional data. For KDE I'm using the code published in MatlabWork ...
0
votes
0answers
15 views

Open Matlab .mat data file in R [on hold]

This question has probably been asked numerous times... I have a Matlab .mat data file in my Matlab directory, which I want to open and use in R. How do I do this? When I type data <- ...
3
votes
0answers
27 views

Cholesky factorization and forward substitution less accurate than inversion?

I recently asked this question asking for an efficient way to compute the Mahalanobis distance (without calculating the inverse). The accepted solution was to use the Cholesky factorization and ...
1
vote
0answers
8 views

MATLAB: bounding the parameter values in nonlinear modelfitting and AICc scores

I am trying to fit a number of nonlinear models to a dataset, and I need to bound the model parameter values to all be positive. I tried lsqcurvefit function and it works. However, I also need AICc ...
0
votes
0answers
20 views

How to reconstruct the observed data using weighted-PCA in Matlab?

Calling pca function in Matlab using the inverse of variances as variable weights: ...
2
votes
0answers
40 views

Sandwich Estimator in Maximum Likelihood Estimation of Logit

I am estimating a discrete choice model using mixed logit using Halton Draws. So everything is basically numerically done. The code is written in MATLAB. I am using MATLAB's fminunc to do ...
1
vote
1answer
34 views

Neural Network System Identification

I am trying to implement a Neural Network to identify a Nonlinear System. I have implemented a very simple system in simulink and on the basis of examples of its input and output I would like to have ...
0
votes
0answers
11 views

Visualization of two terciary vectors

Let $x,y\in\{-1,0,1\}^n$ are two tertiary vectors of the same size where $n$ is a large integer such as $n=1000$. I want to see that $y_i=x_i$. Do you have any idea of the visualization of that ...
0
votes
0answers
7 views

How to obtain all but an indexed row in a matrix - MATLAB? [closed]

I am estimating a Vector Autoregression with ratios and first differences. Namely, I have T/Y, G/Y and $\Delta$Y. Where T is total taxes, G is government spending and Y is GDP. To compute my Impulse ...
-1
votes
1answer
33 views

Which one is faster? MATLAB SVM or scikit SVM? [closed]

Which one is faster, SVM from MATLAB or SVM from scikitlearn?
2
votes
0answers
24 views

How to remove horizontal bar in Hindi word Matlab

I wish to remove the horizontal bar (Shirorekha) from the word to get characters from the following image, for character recognition. Any ideas as to how can I do that. I tried to use Hough ...
0
votes
0answers
21 views

Dynamic Neural Network with randomly shuffled training data

I'm using an Nonlinear AutoRegressive neural network with eXternal input (NARX) to model a water conveyance system as part of my master thesis. I'm implementing this model with MATLAB R2013b. In ...
1
vote
0answers
21 views

Matlab: Help in mitigating the problem: Non-positive definiteness of a matrix

EKUKF toolbox contains a file ut_sigmas.m I am facing a frustrating problem with the covariance matrix $P$ of the measurement when using Cholesky decomposition. ...
-1
votes
0answers
9 views

Matlab gradient and hessian computation for symbolic vector function [migrated]

I am trying to use the Matlab "gradient" and "hessian" functions to calculate the derivative of a symbolic vector function with respect to a vector. Below is an example using the sigmoid function ...
0
votes
0answers
31 views

Nan values in regression MATLAB

I run the following regression: mdl=fitlm(Reg_var(1:end,2:end),Reg_var(1:end,1),'RobustOpts','on') My output: ...
0
votes
0answers
18 views

advice regarding which ant clustering algorithm to choose

I am working on this project in which I am going to take a small corpora of input text consisting of works of literature from different genre. After extracting a set of features, I wish to perform ...
1
vote
1answer
138 views

Why are all my p-values so low in logistic regression model?

I'm trying to make a regression model to explain a dependent variable that follows a binomial distribution - I have data on the number of successes and the number of trials for each observation. The ...
0
votes
1answer
23 views

Validation of Kernel Regression

I have a data set which I divided in two part(development and validation). I am using kernel regression for build a relationship between independent and dependent variables in development period data. ...
6
votes
1answer
53 views

Computing Dvoretzky–Kiefer–Wolfowitz bounds in MATLAB

When I run the Kolmogorov-Smirnov test (kstest2 function in MATLAB) on two given data vectors, I get the value of KS Statistic. How should I compute Dvoretzky–Kiefer–Wolfowitz (DKW) bound using this ...
1
vote
0answers
14 views

Matlab FACTORAN error on line 162: a covariance matrix is not positive definite [closed]

I have a data set called Z2 that consists of 717 observations (rows) which are described by 33 variables (columns). The data is standardized by using ZSCORES. Additionally, there is no case for which ...
0
votes
0answers
49 views

Trained Logistic Regression returns 'NAN' for some out of sample data

I'm using MATLAB R2015a, glmfit function for training and glmval for out of sample ...
0
votes
1answer
32 views

Does the kernel trick really map 2d data to 3d data?

I want to learn something about kernel trick in svm, so I'm using this code: ...
0
votes
0answers
37 views

Johansen test results using James LeSage toolbox

I am a little new to econometrics. Please pardon me for this silly question. I was running a Johansen cointegration test on two time series using the econometrics toolbox provided by James LeSage for ...
1
vote
1answer
48 views

Confusion Matrix Matlab has a 0% for a class during training

When I train Multi-Layered Perceptron using Matlab for 6 classes, for one of the classes I get a 0% in GREEN in the confusion matrix. This leads to to a high error percent for the overall training, ...
3
votes
1answer
81 views

R or MATLAB - how to fit a function to experimental data, satisfying specific constraints

My first question here, hope it works :) I have experimental data $(x_i,y_i),i=1\ldots n$, $n=O(10)$, which describe a function $y=f(x)+\epsilon$ defined in $I=[0,1]$. $y_i$ is a ratio between ...
0
votes
0answers
30 views

Cross-Validation gives different result on the same data

I have done Cross-Validation by crossval function in matlab on my data, but when I run the Cross-Validation many times, it give me a different results, so is that ...
0
votes
1answer
47 views

Singular Value decomposition positive components

I am using Singular Value Decomposition (SVD) applied to Singular Spectrum Analysis (SSA) of a timeseries. ...
0
votes
0answers
13 views

How to use the bootstat function to bootstrp without replacement? [migrated]

I have a simple MATLAB code to perform a bootstrap, but I need to do this without replacement. How do I write the bootstat function such that there is NO ...
7
votes
0answers
157 views

Biased estimator for regression achieving better results than unbiased one in Error In Variables Model

I am working on some syntatic data for Error In Variable model for some research. Currently I have a single independent variable, and I am assuming I know the variance for the true value of the ...
2
votes
1answer
54 views

Percentage of contribution of multiple factors to a single dependent variable

I have a set of data (underway observation along cruise track) which includes one dependent variable A and three independent variables B, C, and D. It's known that A is related with each of the three ...
-1
votes
0answers
16 views

subtraction mean from nonstationary time series [closed]

suppose we have non stationary time series,with size size(B) ans = 2000 1 i selected several parts from this time series and create 4 new ...
0
votes
1answer
28 views

Do the values in the second factor from a principal component analysis have to have different signs?

I am computing the principle component matrix of a financial database and to obtain the second factor I extrapolate the second vector. So far, it's easy, but I wonder, do the signs of the second ...
0
votes
0answers
13 views

Evaluate the multivariate normal using variance matrices $\boldsymbol{\Lambda}+\alpha_{i}\mathbf{a}\mathbf{a}^{T}+\beta_{j}\mathbf{b}\mathbf{b}^{T}$

I need to calculate a huge amount of inverses and determinants to evaluate the pdf of the multivariate Gaussian. Specifically I need to compute the inverses and determinants of the following ...
1
vote
1answer
19 views

Matlab - why crossval function inputs a full trained model?

The question is regarding the Matlab implementation. As we can see here, the crossval function expects to receive a full trained model. For example, my data ...
2
votes
0answers
24 views

Difficulties in interpreting the Equations in Parameter estimation for linear dynamical system

I have implemented the Kalman Smoothing with Expectation Maximization based on the Paper Parameter Estimation for Linear dynamical system. All notations are based on this paper. The model is an IIR ...
0
votes
0answers
46 views

using Cross Validation in matlab with neural networks

I want to make a cross validation on neural network, I tried to pass the labels to crossval function, with the help of ...
0
votes
0answers
30 views

10 balls in 3 boxes simulation in MATLAB

Does anyone know how I could use matlab to calculate the probability of throwing 10 balls at 3 buckets? Bucket 1 has a 1/4 chance, bucket 2 has a 1/2 chance and bucket 3 has a 1/4 chance. So how would ...
0
votes
0answers
40 views

autoregressive coefficient and white noise

I have one variable of Monthly rainfall data. I have developed a forecasting model using Back-propagation Neural Network Model (using Matlab), with 3 input units and one output unit, the three inputs ...
1
vote
0answers
34 views

Parameter selection in one class svm

Is there any accepted way to select the best parameters for one-class svm with a linear kernel in r? I have managed to run the svm function in e1071 but it is super sensitive to the model ...
1
vote
0answers
19 views

On the computational efficiency of some matlab code when finding the loglikelyhood

I am looking at some code on GAS models found here (number 7). The code finds the log-likelihood of the joint conditional distribution of each observation by summing up the single log-likelihood of ...
1
vote
1answer
30 views

Clarification in the terms of log-likelihood expression

I am trying to implement Eq(7) given below from Parameter estimation for Linear dynamical system where Q is a 2 by 2 covariance matrix of the process noise. The model is ...