MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks. MATLAB can be used when performing tasks such as signal processing and communications, image and video processing, computational finance, and computational ... ...

learn more… | top users | synonyms

0
votes
0answers
36 views

How to plot $\int\frac{\mathrm{d}y}{W(-e^{-y^2/2-1})+1}=x$ in Matlab?

I would like to plot in Matlab the following implicit equation: $$\int\frac{\mathrm{d}y}{W(-e^{-y^2/2-1})+1}=x,$$ where $W(\cdot)$ is the Lambert $W$ function. I am trying to plot it symbolically ...
0
votes
0answers
16 views

Inflow and outflow of Traffic graphs

For my bachelor thesis I am making a model for calculating a distribution of traffic in a network/graph given the delay on the links of the graph. I have written a Matlab program, and it seems to ...
1
vote
1answer
33 views

How to find data distribution law using MATLAB? [closed]

Having a random variable $T \geq 0$ and a set of discrete data represented by $t=t_i$ and $P(T \leq t-i)$. My aim is to find the distribution law of $T$. Is there any fast method in Matlab that can ...
0
votes
0answers
28 views

Solving 2nd order ODE with 2 independent parameters(over finite intervals), with bounds on solution

I have a 2nd order ODE of the form: $\ddot {x} + 2c \dot {x} + 39Ex = 0 $ $Initial$ conditions being: x(0) = 0 and $\dot {x}(0)$=0.1 Where c is in the interval [1,5] and E is in the interval ...
0
votes
0answers
12 views

Error estimation - spline interpolation

I got a question regarding error estimation and spline interpolation. I got a parabola shaped graph that I've used spline interpolation on to get more accurate data. I've used a much smaller step on ...
1
vote
0answers
45 views

How to calculate Gradient of a vectorized equation.

I am solving a huge optimization problem in Matlab. I am now required to obtain gradient of objective function,and nonlinear constraint along their hessien matrix. ...
1
vote
1answer
59 views

Cholesky algorithm

Good afternoon everyone, I'm in need of a factoring algorithm cholesky and algorithms to solve upper and lower triangular systems, but I'm not finding any work in that octave. Recalling that need the ...
2
votes
3answers
57 views

Least Squares method and Octave/Matlab [closed]

I'll try to be as clear as possible so that you understand what I'm trying to do and can help me I have twelve pairs of data $(x_1,y_1),....,(x_{12},y_{12})$ and from this data we established a model ...
0
votes
1answer
28 views

randomly rough surface by ifft : real output from ifft

I'm trying to generate a randomly rough isotropic surface with predefined roughness amplitudes (standard deviation of heights). Suppose I have the absolute values of fourier components of the surface ...
0
votes
0answers
8 views

Sorting signals to achieve highest possible similarty

I am currently trying to develop an algorithm in Matlab that sorts signals, which I have as columns of a matrix, to achieve the highest possible similarity of the signal with its neighbors. My first ...
0
votes
1answer
62 views

MATLAB: minimize function using x value from previous iteration

I'm trying to develop an algorithm for a proximal point method defined as: $$ \underset{x \in \rm I\!R^n}{\arg\min} f(x) + \lambda g(x) $$ where f(x) is a convex and coercive function and also ...
4
votes
2answers
121 views

Implementing Ornstein–Uhlenbeck in Matlab

I am reading this article on Wikipedia, where three sample paths of different OU-processes are plotted. I would like to do the same to learn how this works, but I face troubles implementing it in ...
2
votes
1answer
82 views

Evaluate integral over complex path numerically to show that $C_\infty$ is equivalent to $-I$

I would like to evaluate $$C_\infty = \int_{R = -a}^{R = a} H_0^{(1)}(z) e^{-izt} dz $$ where $H_0^{(1)}(z)$ is the Hankel function of the first kind, $a \rightarrow \infty$, and $$ z = R - i ...
1
vote
2answers
32 views

Secant method with two ODE's of degree 2 - matlab

$$\frac{d^2r}{dt^2}-r\left(\frac{d\phi}{dt}\right)^2=G\cos\alpha-g\frac{R^2}{r^2}$$ $$r\frac{d^2\phi}{dt^2}+2\frac{dr}{dt}\frac{d\phi}{dt}=G\sin\alpha$$ The two ODE's above are given. I have written ...
0
votes
2answers
51 views

please how to rotate a matrix $5\times4$ by 45° around the origin $(0,0)$? using matlab

Suppose I have a matrix $M$ of $5\times4$ dimension (this is represent an image) : M = [3 4 8 9; 1 6 7 3; 9 8 3 1; 1 2 2 0; 7 2 3 5]; ...
0
votes
0answers
20 views

Covariance from Gaussian Mixture Model versus direct calculation

I have a random variable $T$ which can be expressed as follows: $T=c_1P\cdot f+c_2Q$, here $\cdot$ denotes point-wise multiplication. $c_1,c_2$ are scalars and treated as constants. Distribution of ...
0
votes
0answers
38 views

Why do I get a big error when I compute this integral with Gauss-Legendre Quadrature?

I'm using Gauss-Legendre Quadrature to solve the following integral: $\int_0^{1}x^xdx$ After I've compared the result with the MatLab vpa(int(...)) of the same integral I've noticed that the ...
0
votes
2answers
42 views

Rational function regression without poles in a interval, or polynomial regression with positivity constraint

I have some sets of experimental data for some functions $f_i$ from $I=[0,1]$ onto itself, which should satisfy the following physical constraints: $f_i(0)=1$ $f_i(x) \in I= [0,1] \; \forall x \in I ...
0
votes
1answer
51 views

Are my results realistic or is there an error somewhere?

The background is that I'm solving a problem in Numerical Analysis which I asked about here: Is my derivate correctly programmed? Now if I use the new code, then I get a result that is along the ...
0
votes
1answer
58 views

Is my derivate correctly programmed?

I'm solving a problem in numerical analysis, page 9 of this text (soundwaves under water) and I think that I'm getting the correct result but I'm not sure if I programmed my derivate correct. My ...
0
votes
0answers
16 views

Generate feature vector matrix given mean and covariance matrix

What should be the steps i should follow for the following question using MATLAB generate matrix X which has 400 columns of feature vectors, first 200 columns from class 1, then 200 from class 2. ...
0
votes
1answer
32 views

Dot product of a sinusoid with a complex tone in Octave

I am trying to figure out how to solve this problem; Now make a new sinusoid with amplitude 1 and frequency 1000Hz. Calculate the dot product of this sinusoid with your complex tone using ...
1
vote
1answer
34 views

How to program a little code that shows me the evolution of the system when starting with initial values?

I have rather no programming skills, neither with Matlab nor with other languages. I need a little "program" that shows me the evolution of a dynamical system when giving it some initial values. The ...
1
vote
0answers
35 views

problem implementing leave-one-out cross validation for optimal bandwidth in Matlab

I'm trying to solve an exercise in which I need to calculate the local constant kernel estimator and provide the bandwidth using leave-one-out cross validation. The idea is that I need to sort of ...
1
vote
0answers
26 views

How can we formulate the art gallery problem as a mixed-integer linear program?

Specifically, how would one go about using 'intlinprog' in MATLAB to get a minimum value for the cameras required in a polygon-shaped art gallery? In other words, I think that what I am looking for is ...
0
votes
1answer
37 views

Differential equation concerning echolocation

I am in the process of trying to solve a differential equation using MATLAB. Given information is the following: $$ c(z) = 4800 - 20.2090 + \frac{17.3368z}{1000}+272.9057e^\frac{-0.7528z}{1000} $$ ...
1
vote
0answers
30 views

Must Number of equality constraints and decision variables be equal?

Must Number of equality constraints and decision variables in an optimization problem be equal ? If not, how can I solve the equality constraint equations with a solver e.g. ...
2
votes
1answer
63 views

Theoretical and computational results of ODE differ a lot! Why?

Hello. I have a problem in that my theoretical and practical(computational) calculations differ a lot. in 1 order of magnitude actually. Impulse I needed to jump over the saddle point in one ...
1
vote
0answers
23 views

Difference between impulse and step response.

My question is quite simple but I have some difficulties finding an answer to it. I was wondering what was the difference between the impulse and step response functions in MATLAB. The "help" section ...
0
votes
1answer
33 views

Real logarithm of a real matrix?

What is the real logarithm of \begin{equation} \begin{pmatrix} -1 & 1 & 0 & 0 \\ 0 & -1 & 0 & 0 \\ 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & -1 \end{pmatrix}? ...
0
votes
1answer
46 views

How to find Parameters in nonlinear Regression Model?

I have a nonlinear Regression Model with eleven observations of $x,y$. How do I find the parameters $a,b,c,d$ of the model: $ y=f(x)=a + b \sin cx e^{dx}$ by using the function: $$\Phi(a, b, c, ...
-1
votes
1answer
50 views

how to check data fits gamma distribution in MATLAB ?

I have two vectors which also contain zeroes. I cannot remove the zeroes as that is also data. I have to see whether my data fits gamma distribution or not. How can I check that?
1
vote
1answer
55 views

How can I solve numerically this partial differential equation?

I am reading this paper and came across a system of differential equations with 4 ODEs and 1 PDE. The PDE is given below. My question is how to solve this numerically in MATLAB , Python or ...
0
votes
1answer
66 views

Solving an equation in matlab

I would like to solve the equation: 1/2*logninv(x, 0.03-1/2*0.2^2 + log(100), 0.2^2) +1/2*logninv(x, 0.03-1/2*0.1^2 + log(100), 0.1^2) == 100 I can solve this ...
0
votes
0answers
8 views

What is the meaning of the output weights of a Conditional Random Field (CRF) model?

Problem When train my linear chain CRF with annotated observations, I feed it with a number of sequences containing observation values and a "ground-truth" label for each observation. I'm currently ...
0
votes
0answers
45 views

How to solve this ODE numerically?

I have a question about how to solve this ODE numerically: $$\frac{C}{4}y'^2+\frac{C}{4}y''y+(0.098)^2y''y'''=0$$ where $C$ is a constant and the initial conditions are $y(0)=y''(0)=0$ and $y'(0)=1$. ...
0
votes
0answers
13 views

Plotting Non Linear Programming functions

I define these functions in Matlab: ...
0
votes
2answers
68 views

Matlab Monte Carlo Method Volume Calculation

The question: use the Monte Carlo method to find the volume of intersection of, three cylinders, all of radius 3 units and infinite in length,with the axis of the first cylinder being the x-axis, the ...
0
votes
0answers
48 views

Finding $Q$ for any $A$ s.t. $QAQ^\top = I$

Given an invertible and PSD matrix $A$, I am looking to find $Q$ such that: $$ QAQ^\top = I $$ What is a/the right/efficient way to do this? Here is what I did: SVD gives $$ A \approx U S V^\top ...
0
votes
1answer
50 views

How to solve the eigenvalues of a complex matrix of very high condition number?

WHAT I FACE: I'm dealing with a complex matrix of very high condition number and I have to solve the eigenvalue and eigenfunction of it. But in Matlab, I got the problem that the results are not ...
0
votes
1answer
50 views

Using the Monte Carlo method to find a volume

Use the Monte Carlo method to find the volume of intersection of, three cylinders, all of radius 3 units and in finite in length,with the axis of the first cylinder being the x-axis, the axis of the ...
1
vote
1answer
61 views

Trouble with derivatives using Newton-Raphson in MatLab

I'm finding it very difficult to get my head around how best to express the following system of equations in MatLab in order to solve it. The equations come from Von Karman's similarity solution to ...
1
vote
1answer
42 views

Can not build a phase space for simple oscillator

2 question is: how to move out the particle from the potential well? I am stuck on a problem that I have a simple harmonic oscillation for which I want to draw a phase space. I can do this inside the ...
0
votes
1answer
19 views

Regression project in octave/matlab

I'm trying to establish a polynomial model to adjust the variation of the dollar throughout the year. Suppose hypothetically that I have the following data ...
1
vote
1answer
36 views

Why do I get complex convergence?

I have problem with understanding why I get the complex convergence when using Newton-Raphson's method (own implemented) to the convergence tables down below: ...
0
votes
1answer
123 views

Solving a system of two second order ODEs using Runge-Kutta method (ode45) in MATLAB

I'm trying to solve the system of differential equations outlined in Von Karman's rotating disk flow. I got them into a system of ordinary differential equations: F(n), G(n), H(n) $$F'' = -G^2 + F^2 ...
0
votes
1answer
63 views

How do I determine the transfer function of a plant?

I sitting here with a system which I have to determine the transfer function. The unit receives a velocity and position, and move towards that position with the given velocity. What kind of test ...
0
votes
1answer
60 views

N body ODE simulation

I have been staring at the below matlab code, which simulates planetary motion, for a while now and I could really use a fresh set of eyes. I cannot understand why it is giving straight line ...
1
vote
0answers
34 views

Problem with plotting a differential equation

I have problem with plotting an differential equation that is as following: $$ \frac{d^2y}{dx^2} + \pi y e^{x/3}\big(2\frac{dy}{dx} \sin(\pi x) + \pi y\cos(\pi x)\big)=\frac{y}{9} $$ where the ...
1
vote
0answers
38 views

Eigenvalues and eigenvectors for earthquake modeling

My instructor explicitly stated that, because we are asked to find eigenvalues and eigenvectors of a $7\times 7$ matrix, MATLAB would be easiest to use. The equation $(1)$ is intended to resemble ...