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

How to Extract the dual feasible search directions for the primal-dual potential reduction algorithm?

I am trying to implement the 4.4 Primal-dual potential reduction algorithm introduced in M.S Lobo et al.. Here is a screenshot depicts the algorithm flow: As ...
1
vote
0answers
29 views

Solve linear system with matlab

In my problem, $A$ is a $m \times n$ matrix with $m \geq n$ and $\mathrm{rank}(A)= n$. Let $\Gamma$ be the $(m+n) \times n$ matrix defined by : $$ \Gamma = \begin{bmatrix} A \\ \mathrm{I_{n}} ...
0
votes
0answers
36 views

10 random observations

I have to generate $10$ random numbers with mean $= 22.6$ and standard deviation $= 2.4$. Then I have to see if the $10$ observations appear to be normally distributed. When I generate $10$ random ...
0
votes
1answer
18 views

Computing Polygonal Surface in Matlab

I am given a bunch of points in 3D-space and want to analyze their convex hull. What I am interested in is what kinds of polygons appear on the surface of the convex hull (probably mostly triangles, ...
1
vote
1answer
32 views

Partial Fraction Expansion in MATLAB

I am to use MATLAB to find the partial fraction expansion of the following function. Can this be done in that format or do I have to manipulate the function? Note: This must be done using pure MATLAB ...
0
votes
0answers
11 views

Finding where plots may cross with octave / matlab

I have several data points that are plotted below and I would like to find the frequency value when the amplitude value crosses 4. I've included an example along with the data points in the example ...
2
votes
0answers
31 views

Boundary Conditions for a Finite Difference Approximation of a Sixth Derivative

I am trying to use a finite difference scheme to numerically solve sixth order parabolic equations such as \begin{equation} u_t = u_{xxxxxx} \end{equation} with symmetry conditions \begin{equation} ...
0
votes
1answer
16 views

Overlaying scatter points over world map in MATLAB

I am facing difficulty overlaying lightning location data over a region of the world map. I have lightning location data where the first column contains longitude and the second column latitude. I ...
0
votes
0answers
20 views

Analyzing Cyclic Behavior of the Temperature in an Office Building

let us consider following code ...
0
votes
1answer
49 views

Best program for multiplying many multivariable polynomials

I want to make a table with two columns: The first column will consist of many(possibly hundreds) of polynomials in two variables. The second column will be a function applied to all of the ...
1
vote
0answers
20 views

Use of Matlab to put equation into vector form

Is there a way to put the following equation of a line into vector form using Matlab? $\displaystyle y=\frac{cos(s_n)-cos(s_{n+1})}{sin(s_{n+1}-sin(s_n)}(x-sin(s_n))-cos(s_n)$
0
votes
1answer
35 views

Estimating how much two probability distributions differ

I have two probability distributions A and B. First I would like to estimate how much they differ. In this regard I use as metric the Jensen–Shannon distance (i.e. the square root of Jensen–Shannon ...
2
votes
0answers
49 views

Algorithm to find the “optimal” path in a given graph

Assume that $G=(V,E)$ is an undirected connected graph and that $H: V \to \mathbb R$ is a function that assign at each vertex $v \in V$ its height $H(v)$. Think of the pair $(G,H)$ as an energy ...
1
vote
4answers
130 views

How to find the intersection points of two circles in 3D

I have two circles in 3D space generated from their parametric equations. Also, these two circles are on the same plane. How can I find out their intersection points from the parametric equations? ...
0
votes
1answer
33 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 ...
0
votes
1answer
35 views

How to use Newton's method to find the roots of an oscillating polynomial? [closed]

Use Newton’s method to find the roots of $32x^6 − 48x^4 + 18x^2 − 1 = 0$ accurate to within $10^{-5}$. Newton's method requires the derivative of this function, which is easy to find. Problem is, ...
1
vote
3answers
78 views

Avoid catastrophic cancellation? but I can't see any?

As you can see here, the question is about part b. By using Matlab, the answer to the part a is -2.4, but by using "format long" to compute directly, the answer is -2.401923018799901, which I don't ...
1
vote
0answers
54 views

How do I draw a perfect egg graph in matlab?

These are my codes: ...
0
votes
1answer
52 views

Numerically Integrate Matrix Equation in Matlab / Octave

How do I integrate a matrix numerically in Octave / Matlab? I am trying to do the following integration numerically in Matlab $\int_a^b T(x)^{-1} B dx$ where $T(x)$ returns an 8x8 matrix. The ...
0
votes
0answers
34 views

Integration of ODE equation in Matlab / Octave

I have a system of 8 ODE's where the initial conditions are in matrix form. $\frac{dT}{dS} = H T$ where T at the initial state is the identity matrix. $T(a) = I$ H is a constant 8x8 matrix T is ...
1
vote
1answer
25 views

How to construct matrix from 4 sub matrices in Matlab?

I have an 8x8 matrix defined as $T = \begin{bmatrix}T_{UU} \quad T_{UF}\\T_{FU} \quad T_{FF}\end{bmatrix}$ I can define $T_{UU}$, $T_{UF}$, $T_{FU}$, and $T_{FF}$ as ...
1
vote
0answers
17 views

choose correct variant of signal/noise ratio calculation

let us consider following sinusoidal model ...
1
vote
1answer
30 views

MATLAB: What is the simplest way to get an element of an matrix multiplication?

What is the simplest way to get an element of an matrix multiplication? Assume $A$ and $B$ are $n\times n$ matricies. And $1\le i\le n$ and $1\le j\le n$ are inidicies I tried $(A*B)(i,j)$ but this ...
0
votes
0answers
32 views

Finding transformation function for a distribution that looks like exponential

Suppose that we have two data sets, R and P. R is larger than or equal to ...
0
votes
3answers
80 views

Using MATLAB to find the max elements and their positions

MATLAB documentation says "[C,I] = max(...) finds the indices of the maximum values of A, and returns them in output vector I." But that does not seem to work. See below. X = [2 8 4; 7 3 9]; ...
1
vote
1answer
59 views

Fourier transform of a continuous non-periodic function in matlab

I would like to use matlab to find an Fourier transfom of a function which is known only on a grid. As an example I take the function f(x) = exp (-x^2), which Fourier transform is known and is equal ...
0
votes
0answers
18 views

Add arrows to the solution trajectories using ode solver?

I have a system of two odes and i want to plot the phase portrait with arrows and clearly representing the stable and unstable steady states. The problem is that i am getting the solution trajectories ...
0
votes
1answer
39 views

How to expand quadratic equations in Octave/Matlab?

I have some column vectors, and I put them in a row, so I have $[a \, b \, c]$. Now I want to get a matrix of the form $[a^2 \, b^2 \, c^2 \, ab \, ac \, bc]$. It is like expanding $(a+b+c)^2$, but ...
1
vote
0answers
40 views

smallest and largest eigenvalue of discretized operator $-d^2/dx^2$

In 1D, the second order derivative operator $-d^2/dx^2$ can be discretized as, using Matlab ...
2
votes
1answer
52 views

Solve system of first order ODEs when values are a matrix

I have a set of first order ODEs such that $$ \frac{d \Psi}{ds} = H(s)\Psi$$ H(s) is an 8x8 matrix. I would like to find $\Psi(b)$ where $b$ is 10, for instance. The initial value for $\Psi(a)$ is ...
1
vote
3answers
38 views

Book for ODEs and numerical solution

I would like to ask you information for a book. I want to (self) study ordinary differential equation and their numerical solution (with MATLAB). I am not a math student (life science) so I want a ...
1
vote
0answers
18 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 ...
0
votes
1answer
35 views

Matlab: need help with optimization

I am trying to minimize the objective function over [x(1),x(2)]: exp(x(1))*(4*x(1)^2+2*x(2)^2+4*x(1)*x(2)+2*x(2)+1)+b subject to constraint ...
0
votes
1answer
56 views

Drawing 3D stomach structure in Matlab [closed]

I would like to plot a 3D structure representing the stomach in Matlab. A sketch of what it should look like is here: http://thoracicsurgery.stanford.edu/patient_care/images/normal-stomach.jpg Still, ...
1
vote
1answer
46 views

differential equation into state space

I have this dynamic system $$ J \ddot{\theta} + F\dot{\theta} = u $$ I would like to acquire the state space of the system. This is what I've done $$ x_{1} = \theta, \\ x_{2} = \dot{\theta}, \\ ...
0
votes
0answers
12 views

How do I get around finding a digital filter which is a narrow bandpass with a small group delay?

I need to find a digital filter that meets the following criterion: Is a narrow bandpass (1/40 of normalized frequency width) As small as possible group delay (preferably less than 300 samples) ...
0
votes
0answers
32 views

traingular matrix

I am not much in to the matrices. so I am sorry if I can not put forward the question properly. Assume $G_{n\times n}$ is a rank $n$ matrix (Indeed $G$ is the generator matrix of a lattice). I need ...
0
votes
0answers
29 views

extrapolate boundary data of a 2d function

I have a function defined over a 2d domain. I want to keep all the internal data, but the information near the boundaries are less accurate and I want to extrapolate them from the inner points. Is ...
5
votes
0answers
58 views

How to solve this equation (may be with least squares)?

I have a system of linear equations in the following form. How can I solve it? $$\operatorname*{argmin}_{a,b} \sum_{i,j} \left( \left| X(i,j)-aY(i,j)\right|-b \right)^2$$ Where $X$ and $Y$ are ...
0
votes
1answer
27 views

How to find parameters that minimize the sum of squares, using Matlab?

I have a system of linear equations in the following form. How can I solve it in Matlab? $$\operatorname*{argmin}_{a,b} \sum_{i,j} [X(i,j)-a\times Y(i,j)-b]^2$$ Where X and Y are known. I need to ...
1
vote
1answer
31 views

infinitisimal part and the directional integral

In the paper A circle detection approach based on Radon Transform by Erman Okman and Gozde B. Akar. I have a few questions on some basics. first of all what does $$ds^2 = dx^2 + dy^2$$ ...
0
votes
0answers
30 views

matlab: cdfplot for relative error

The figure shown above is the plot of cumulative distribution function (cdf) plot for relative error (attached together the code used to generate the plot). The relative error is defined as ...
2
votes
0answers
19 views

using ode45 for descriptive forms

Using Matlab what would be the most efficient way to solve, $A_1x'(t) = A_2x(t)$, where both $A_1$ and $A_2$ are $n\times n$ matrices. Both are sparse matrices and hence I want to avoid inversion. ...
2
votes
3answers
80 views

Integration of a real powered rational expression

Peace be upon you, I've encountered this pretty integral \begin{align*} \int_0^1&\frac{x^{\alpha+\beta-1}-x^{\alpha-1}}{x-1}dx,\\ \\ &\alpha,\beta\in\Re^+ \end{align*} It seems much simpler ...
0
votes
0answers
24 views

Integration of nonlinear and linear ODEs

\begin{equation} \frac{dc_1}{d\tau}= \alpha I(1-c_{0}) + c_{1} (-K_{F} - K_{D}-K_{N} s_{0}-K_{P}(1-q_{0}))+ c_{0}(-K_{N} s_{1}+K_{P}q_{1}), \nonumber \end{equation} \begin{equation} ...
0
votes
0answers
9 views

Showing Covariance in a 3D graph

I have a 3D scatter plot and I want to visually show COVARIANCE on it. One can show COVARIANCE, for example with an ISO LINE. With this method, one generally gets an ellipse aligned with the shape of ...
1
vote
1answer
93 views

find a matrix transform

Given a vector $v={(v_1,v_2,...,v_n)}^T$, I would like to find some matrix operations on $v$ to create an $n \times n$ matrix $X$ such that its entry $X_{i,j} $ satisfy (1), (2), (3), (4), ...
1
vote
1answer
49 views

Differentiation of the Beta function

I suppose that \begin{align*} \frac{\partial}{\partial x}\left[B\left(x,y\right)\right]=&\frac{\partial}{\partial x}\left[\int_0^1t^{x-1}(1-t)^{y-1}dt\right]\\ ...
0
votes
0answers
41 views

Implementing formula correctly in matlab for neuroscience: total soma membrane potential?

Please help me to understand: am I correctly implementing a total soma membrane potential (TSMP) equation in Matlab? Due to being a new member I need to use this list link to refer to the links ...
1
vote
0answers
33 views

Plotting a set in MATLAB

I am trying to plot sets like $$\left\{x \in \mathbb R ^3 : x_1,x_2,x_3 \geq 0, x_i \leq x_j + x_k \mbox{for all combinations of }i,j,k \in \{1,2,3\} \right\}$$ with MATLAB to include the figures in a ...