Function integration in Matlab - matlab

I am trying (unsuccessfully) to perform the following function integration in Matlab
a=0.4;L=10;Ic=10;ra=0.2;n=2;
D11=#(x) (1-x/L).*(1-x/L)./(Ic.*(1+ra.*(1-x./(a*L))^n)^3);
d11=integral(D11,0,L)

Related

any Octave equivalent of fitdist?

The Statistics package for Octave doesn't have the fitdist function in it yet. I have I code from Matlab that I want to run in Octave and relies heavily on this function. How could I replace this function in Octave?
Thanks.

call a MATLAB function in GAMS

Is it possible to use a function
of MATLAB in GAMS code.
I have a matrix in my GAMS cod , and I need to have inverse and determinant of matrix , is it possible to call a Determinant function of Matlab in GAMS ? If it's possible How?
Calling GAMS with MATLAB is made possible with the data exchange tools between GAMS and MATLAB called GDXMRW. You can learn more about the process of Data Transfer from the link below.
https://www.gams.com/latest/docs/T_GDXMRW.html

function evalclusters from Statistics toolbox not found in matlab

I would like to use the function evalclusters from the statistics toolbox in matlab, but matlab is unable to find the function when I call it.
help evalclusters
returns 'evalclusters not found.'
The statistics toolbox is installed [license('test','statistics_toolbox') returns '1'].
Thanks!
evalclusters was added with Matlab 2013b and extended with 2014a, it is not available in Matlab 2013a.
In case upgrading Matlab is not an option, current Octave Statistics package includes it as well. (Open-Source alternative to Matlab which basically uses the same syntax)

Is 'ols' function in Econometrics toolbox in MATLAB?

I am trying to run a code which calls the function OLS. reg=ols(y,X). I am getting an error saying that ols is an undefined function for input of type double. Is ols a function in the econometrics toolbox or do we create a separate ols function? I have checked the working directory and the toolbox is added to the path. I don't know what the problem is.
I don't have ols either and I have the econometrics toolbox. I'm guessing you are looking for some functions in File Exchange, most likely the Toolkit on Econometrics and Economics Teaching.

Simulate ARMA process in matlab

I am trying to simulate a time series process using Matlab. For example, let's see the following example:
http://www.mathworks.com/help/econ/arima.print.html
When I run following code
model = arima(1,0,1);
[fit,VarCov] = estimate(model,Y,'print',false);
I get the following error:
??? Undefined function or method 'arima' for input arguments of type 'double'.
Does Matlab contain functions for Matlab? Can I calculate different functions,like calculate autocorrelation or autocovariance at different lag? Or estimate ARMA parameters?
You need to make sure that you have a license and code for the Econometrics Toolbox before using that function. MATLAB has annoying license requirements for both the main software and its various toolboxes :(
But, you may be able to find some public code that can do the same thing. Check out http://www.mathtools.net/