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

1
vote
1answer
12 views

How to find data distribution law using MATLAB?

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
15 views

Identification of a given barcode as either 1 D or 2 D [on hold]

I am working on an algorithm (in MATLAB) to identify/classify a given bar code (image) as 1 D or 2 D. I have considered using the contrast of the image matrix as a parameter or using the FFT of the ...
0
votes
0answers
21 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 ...
-3
votes
0answers
15 views

MATLAB related query [on hold]

How we can execute a program in MATLAB of a perpendicular line passing through the mid point of a line segment.Plz help me
0
votes
0answers
9 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 ...
-2
votes
1answer
29 views

Second differential equations MATLAB [on hold]

I'm trying to resolve this equation with ODE: $y’’ + 4y = \sin^2(2x)$; Initial condition $\to y(\pi) = 0,\ y’(\pi) = 0.$ And compare with the analytical: $$ y = –\frac{1}{6} \cos(2x)+ \frac{1}{4} ...
1
vote
0answers
38 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. ...
0
votes
0answers
15 views

Heat Transfer FEM 2D PDE Matlab [on hold]

I'd love to know if this looks right in any way since I'm unfamiliar with Heattransfer. The Domain is correct. The heat transfer coefficient is 1. The Dirichlet BC is u(0,x) = 1 and u(y,1) = 0 ...
0
votes
0answers
24 views

System of ODEs: Boundary Value Problem in Matlab [on hold]

I want to finde a numerical solution for the following 3d system of time dependent ODEs \begin{align} \dot{y}_1 &= y_3 + \frac{y_1}{20} + \frac{1}{y_3+y_1} - \frac{1}{1-y_2} -\frac{1}{y_3} - ...
0
votes
1answer
22 views

Difference in using mldivide and pinv in MATLAB with over-determined system and rank deficient [on hold]

I am dealing with the problem $\mathbf{Ax} = \mathbf{B}$ and my problem is over-determined problem and matrix $\mathbf{A}$ is rank deficient. As we all know we can solve this in a least square sense ...
0
votes
0answers
7 views

MuPAD AxesTitleFont [closed]

I want to plot a 3D plot in MuPAd with different fonts for the three axes. The X and Y axes shall be in normal letters while the Z axis should be a greek letter. If I use AxesTitleFont=["Symbol"], all ...
0
votes
1answer
12 views

What is the sample rate? [closed]

I am a bit confused when i use matlab and create a linearly spaced vector linspace. I when i usually want to create a data set I use ...
1
vote
1answer
44 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
49 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
23 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
7 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 ...
-1
votes
0answers
24 views
0
votes
1answer
40 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 ...
0
votes
1answer
45 views

solving Non-liner optimization with non-liner constraint using fmincon in Matlab [closed]

I'm trying to solve a non-liner optimization problem with a non-liner constraint by applying fmincon function in matlab. However, I got the following error: "Failure in initial user-supplied nonlinear ...
4
votes
2answers
52 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
78 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
votes
1answer
17 views

Intersection points of curves in MATLAB [closed]

I need to use the intersection point of two random curves, which I derive by plotting experimental data points(random arrays), in my MATLAB for further programming. Is it possible for me to get those ...
0
votes
0answers
18 views

A Matrix Function Exponentiated (matlab) [closed]

I have a constant matrix A, and a vector t. I want to have $$E=e^{At}$$ I managed to do this with a code I wrote myself: ...
1
vote
2answers
28 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
48 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
16 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
34 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
34 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
48 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
57 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
10 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
23 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
33 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
20 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
25 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
30 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
14 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
0answers
53 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
16 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
38 views

Matlab - Change Euler notation into sin(t) and cos(t) [closed]

I was wondering if I could convert my state transition matrix into sin(t) and cos(t) instead of Euler representation. Here is my ...
0
votes
1answer
30 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
31 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
28 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
45 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
50 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
4 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
40 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
12 views

Plotting Non Linear Programming functions

I define these functions in Matlab: ...
0
votes
2answers
61 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
45 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 ...