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
votes
1answer
26 views

QR and Cholesky decomposition

A while ago I asked for help to develop a polynomial regression model using least squares, where the system was solved by cholesky decomposition, you can check it here Cholesky Polynomial Regression ...
-1
votes
0answers
22 views

Quick MATLAB Question [on hold]

I have a script I have to execute with MATLAB. This script takes a bunch of numbers and produces a single output from those numbers and prints them to a new file. However, I am running into a problem ...
2
votes
1answer
62 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 ...
0
votes
0answers
8 views

Correlation between ordinal variables

I want to know the correlations between 3 groups of variables which are oridinal (rating of 1 to 10). I have followed the formula on wiki and computed the Kendall tau-b correlation coefficients ...
-1
votes
0answers
13 views

Absolute value equality of variables in optimization problem [on hold]

I am trying to solve an optimization problem using either MATLAB's built-in $linprog$ function, or with MATLAB $CVX$ front-end. These tools provide an easy way to model constraints such as $A \cdot x ...
0
votes
0answers
29 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
17 views

Circulant matrix - Eigen decomposition in matlab [on hold]

$A = FD{F^{H}}$ , where $A$ is a circulant matrix, $F$ is normalized FFT matrix (unitary) and $F^{H}$ is the conjugate transpose (Hermitian) of the $F$ matrix. $D$ is the diagonal matrix which ...
0
votes
0answers
13 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 ...
0
votes
1answer
18 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
votes
0answers
26 views

Differential Equation ODE. [on hold]

Hello I have a problem with this differentials equations of first-order, im trying to do it with ode23 and ode23s. The differentials equations are the next one: y'+3y+z=0 z'-y+z=0 with this initial ...
2
votes
1answer
17 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
1answer
309 views

MATLAB determining elementary matrices for LU decomposition

I am confused by this question I am studying for MATLAB practice.
0
votes
0answers
18 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
23 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
10 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
39 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
1answer
355 views

Plot recursive signal in Matlab

I need to create and plot this signal in matlab with 2000 points: x(n) = 0.6530 x(n-1) - 0.7001 x(n-2) + v(n) Where $x(-1)=x(-2)=0$ and $v(n) =$ white noise I ...
-2
votes
1answer
34 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} ...
0
votes
0answers
16 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
25 views

System of ODEs: Boundary Value Problem in Matlab [closed]

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} - ...
2
votes
3answers
50 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 ...
1
vote
1answer
47 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 ...
0
votes
1answer
23 views

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

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 ...
2
votes
2answers
104 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 ...
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 ...
2
votes
1answer
36 views

Adjacent faces to a vertex of a vertex of a polytope

I am a total newbie in Matlab. For a given faces of a polytope, how can I collect adjacent faces of a vertex of a polytope in matlab? Example: v = [ -1 0 0 %vertex 1 1 0 0 %vertex 2 1 1 0 %vertex 3 ...
2
votes
1answer
787 views

Solving double integral numerically in matlab

In the paper "The fractional Laplacian operator on bounded domains as a special case of the nonlocal diffusion operator". Where the author has solved a fractional laplacian equation on bounded domain ...
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
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 ...
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 ...
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 ...
4
votes
2answers
57 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 ...
0
votes
1answer
43 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
49 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 ...
-1
votes
1answer
18 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
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]; ...
1
vote
1answer
283 views

acoustics under water

I've got the following problem that is taken from the numerical analysis book by Kahaner-Moler-Nash (P8-15): The speed of sound in ocean water depends on pressure, temperature and salinity, all ...
0
votes
1answer
294 views

Gaussian distribution and its parameters

I need to learn more about Gaussian distribution and given a set of data, plot a Gaussian distribution of it. Using the following code sample, could you please tell me how I can plot a Gaussian ...
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
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 ...
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 ...
0
votes
1answer
25 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 ...
0
votes
0answers
12 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
362 views

One strange way to generate b-spline base

I am trying to use curve fitting under Matlab. There are two kinds of spline in Matlab: piecewise polynomials and b-spline. For b-spline, we know that the basic functions can be derived by means of a ...
4
votes
2answers
292 views

Image Reconstruction:Phase vs. Magnitude

Figure 1.(c) shows the Test image reconstructed from MAGNITUDE spectrum only. We can say that the intensity values of LOW frequency pixels are comparatively more than HIGH frequency pixels. $$ ...