# Tagged Questions

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 ...

130 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 ...
62 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 ...
203 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 ...
2k 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 ...
137 views

240 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?
155 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 Mathematica?...
348 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 ...
26 views

### Plotting Non Linear Programming functions

I define these functions in Matlab: ...
302 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 ...
56 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$$...
225 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 ...
130 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 ...
146 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 ...
50 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 ...
37 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 ...
58 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: ...
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 ... 2answers 320 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 ... 1answer 100 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 ... 0answers 41 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 ... 0answers 180 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 a ... 1answer 668 views ### Coefficients of a linear combination Suppose I have a vector space V, with \{\vec e_1, \ldots, \vec e_n\} forming a basis of V. Also, suppose that I have a vector \vec x \in V, which I want to express as the unique linear ... 1answer 50 views ### First order non-linear ordinary differential equation The following ODE is given: a\pm\sqrt{b+c*(x(t)+d))}=e*x'(t)+f*x(t)  from Matlab I'm able to get a solution for the differential equation (actually two solutions, one for the + and one for the - ... 1answer 67 views ### Did I do something wrong solving this PDE in MATLAB? I have the following PDE problem on a practice exam: I have completed the problem using MATLAB to the best of my ability. Here is the code I used ... 2answers 126 views ### Fourier Decompositon problem have a look at this video of Fourier Decomposition of an image (otherwise you can also refer the image, which shows few plots of different extracted waves from an image). We also know that a Fourier ... 1answer 2k views ### Roll PID Control for quadcopter I'm trying to implement with simulink a PD controller for my quadcopter. I use a simplified model, and for the roll case I have  I_x * \phi = L , where L is the roll torque. So, the transfer ... 0answers 27 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 ... 1answer 140 views ### tridiagonal matrix with a corner entry from upper diagonal I am trying a construct a matlab code such that it will solve an almost tridiagonal matrix. The input I want to put in is the main diagonal (a), the upper diagonal (b) and the lower diagonal and the ... 1answer 76 views ### Create matrix of coefficients in matlab I have written a function that creates a matrix based on a polynomial of a given degree. I will ultimately use this to fit data, but the problem I am having is that I can not find a good way to create ... 3answers 82 views ### Converting nonlinear second order ODE to first order The second order ODE is:$$ y'' + ky' + (mg/c)\sin(y) = 0 $$k, m, g and c and constants. What is the first order ODE and how do I do it? 0answers 207 views ### Minimizing Sum of Least Squares in Matlab I am working on this minimization problem for image warping that I want to solve in Matlab: Each feature p can be presented by a 2D bilinear interpolation of the four vertices V_p = [v_p^1, v_p^2,... 1answer 57 views ### How can I compute \frac{exp(\lambda v_j)}{\sum_{i=1}^n exp(\lambda v_i)} in a stable way? Given an n vector and \lambda > 1e4 I wish to compute this sum$$\frac{exp(\lambda v_j)}{\sum_{i=1}^n exp(\lambda v_i)} for a fixed $j \in \{1, \dots, n\}$. The sum should be less than one, ...
I use MATLAB's fminunc function in order to find the minimum of a negative log-likelihood function $f(\overrightarrow{\theta})$, parametrized by 3 parameters lets say \$\overrightarrow{\theta}=(\beta,\...