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

Why is the square of an image not equvalent to taking the autoconvolution of an image in fourier space?

Al right I know that in order to multiply in the normal domain I have to take the convolution in Fourier domain but when I do so in matlab and invert the result then I come up with nothing but a lot ...
2
votes
1answer
51 views

Real series convergence check

$$ \sum_{n=1}^\infty \frac{n! \> x^n}{(x+1)(2x+1) \cdots (nx+1)} $$ I start with d'Alembert, $\displaystyle L= \lim_{x\to\infty} \frac{a_{n+1}}{a_n}$ it gives me: $L=x+1$, to find convergence ...
0
votes
0answers
40 views

How can I raise a sum of imaginary numbers without losing it's shape?

I try to be be a little bit more specific; I define a Gauss sum with $$G(p,q)=\sum\limits_{m=1}^{q-1}\zeta_p^j*\zeta_q^m$$ Here $\zeta_q=e^{2\pi i/q}$ and $\zeta_p=e^{2\pi i/p}$ are qth and pth ...
1
vote
1answer
21 views

Plotting 2 parameters function in MATLAB

I want to plot 2 functions in MATLAB. First one is like this: X=[0.1 0.2 0.3]; Y=[5 4 1]; plot(X,Y); and the second one that I want to plot on the last function at the same figure is ...
0
votes
0answers
23 views

How to input equations in MATLAB and operate on them?

I'm using MATLAB R2013a. I want to input an equation in Matlab, e.g., $f(x) = x^2 - 2 x + 3$. I want it to be inputted by the user. I use the inline function for ...
0
votes
0answers
31 views

Numerical integration in Matlab using polar coordinates

I have a set of points givven in polar coordinates which suppose to lie on the perimeter of a circle. I would like to calculate the surface of the circle that is most close to the form the points ...
0
votes
0answers
35 views

Matlab FFT (dst) Diffusion equation with Fourier sine transform in Matlab

Good day, following the exposition presented on this site PDE with Fourier Transform I'm trying to solve a simple diffusion equation $u_t = u_{xx}$ with $u(x,0)=3\sin(2\pi x)$ and $u(0,t)=u(2,t)=0$. ...
0
votes
1answer
49 views

How to properly take derivative of discrete data numerically in matlab?

Taking derivative of discrete data requires some fitting and then using the b-form of the polynomial. How to make a 'good' fit and properly take derivative? I am confused what is the right behavior ...
0
votes
1answer
30 views

Use Matlab to determine the point of intersection of lines

I want to determine the point of intersection of two lines using Matlab. I have the two lines in the form of y = tan(theta)*x + c. I'm seeking an algorithm that does this and I already know how ...
1
vote
1answer
30 views

Factorize polynomial in Matlab

I want to factor (break up) a polynomial $P(x)$ into first orders $(x + a_i)$ for real roots and second orders $(x^2 + b_ix + c_i)$ for complex roots. That is to say, $$P(x) = \prod (x + a_i) \prod ...
0
votes
0answers
25 views

Implementation of the LOWESS-algorithim (local regression data smoothing)

I need to implement the LOWESS-algorithm in a piece of software I am working on. The LOWESS-algorithm is a type of filter, which applies a locally weighted regression on each data point. In this ...
0
votes
0answers
41 views

Inverse Laplace transform of complicated function

I have a Laplace transformed function that I'd like to transform back. It's quite a complex function however, which is why I am stuck: $$C(x,s) = ...
1
vote
0answers
54 views

Solving a system of partial differential equations consist of 6 equations on 9 variables by using Matlab

I have a system of partial differential equations consist of 6 equations on 9 variables. $p = \frac{\partial f[x_1, x_2, x_3, y_1, y_2, y_3, z_1, z_2, z_3]}{\partial x_1};$ $q = \frac{\partial f[x_1, ...
0
votes
0answers
44 views

Solve a system of ODE's using Backward Euler's Method

I am trying to solve a system of ODE's using the backward Euler's method in MATLAB. The system has $3$ equations with the initial conditions given below. $$x' = \lambda - \rho x - \beta xz \\ y' = ...
2
votes
0answers
31 views

How to use piecewise quadratic interpolation?

I'm attempting to get the hang of quadratic interpolation, in MatLab specifically, and I'm having trouble approaching the process of actually creating the spline equations. For example, I have 9 ...
1
vote
1answer
40 views

Smallest, Non-zero Eigevalue of a Sparse Hermitian Matrix Using Matlab's Eigs

I'm looking for the first $10$ smallest non-zero eigenvalue in a symmetrical, sparse, hermitian Matrix $A_{3000 \times 3000}$. There are also a lot of zero-eigenvalues in the eigenvalue-spectrum which ...
2
votes
0answers
34 views

Math behind Photoshop's gradient tool

I want to implement something like Photoshop's gradient tool and I need to understand the math behind it. Can anyone explain the differences between linear, radial, angle, reflected, diamond ...
0
votes
0answers
20 views

MATLAB plotting $\log(h)$ vs. $\log(e(h))$

So I have the initial value problems below. From a previous part, I have already confirmed that $v(t)$ is a solution to the the problem above it. Now I am left to write a MATLAB code that plots ...
0
votes
0answers
12 views

Covariance of estimates using method of moments.

I have a $3\times1$ vector function $f(x_i;\theta)$ where $X$ is a rv and $\theta$ is $3 \times 1$ parameter vector, such that \begin{equation} Ef(X;\theta) = {\bf 0}.\end{equation} If I have a ...
2
votes
1answer
18 views

Algebraic Riccati equation (DARE) stabilazability condition

I'm Trying to help in this question which involves Algebraic Ricatti equation. Honestly to say I never met this equation before. I'm struggling to understand the conditions stated in the limitations ...
1
vote
1answer
43 views

Is it possible to estimate the sign of real part of eigenvalues of a 10 by 10 matrix only by observing all the entries?

I have a symbolic 10 by 10 matrix. It is not difficult to get the eigenvalue expressions by using Matlab. But the expressions of some eigenvalues are too long to be analyzed. I was wondering if there ...
2
votes
2answers
43 views

Matlab Trapezoid Rule Code

Okay so I'm doing numerical integration using the trapezoid rule. I wrote the m file as such: ...
0
votes
0answers
30 views

How to get mathematical model from a data set with MATLAB

I have some values imported from excel about the annual sell of a product, with 3 var, month, price, sold items I have seen how to plot a chart using curve fitting tool but I need to define a math ...
0
votes
1answer
56 views

ODE Modelling in Matlab

I need to model human hairs in Matlab by solving ODEs, but I'm struggling to understand what to do. Here is all of the provided information: I've been asked to write a function returning the ...
2
votes
2answers
26 views

Matlab differential equation verification

Consider $y^{\prime \prime} + y = 0$ and its solution candidate $\cos(t)$. Using MATLAB I would like to substitute the candidate into the differential equation and get verification that it is indeed a ...
4
votes
1answer
59 views

Numerical Solutions of the Telegrapher's Equation

I'm currently working on a brief report on the Telegrapher's Equation for my fractional calculus course. I am still new to Telegrapher's Equations, but I do know they are used to describe electrical ...
1
vote
1answer
41 views

Number of points needed for linear interpolation of sine in $[0,\frac{\pi}{2}]$ with given error bound

I want to get a set of equispaced points in $[0,\pi/2]$ and use piecewise linear interpolation generated by those points to fit the sine function. And I want to determine how many points do I need to ...
0
votes
0answers
35 views

Change input parameter at each time step - matlab - ode45

I am not sure how to change an input parameter, beta, at each time step. My code is below – which gives me an error. Can anybody help? ...
0
votes
1answer
40 views

Solving a system of ODE (3 equations) using runge-kutta method order 4 - Matlab

$$x' = \lambda - \rho x - \beta xz \\ y' = \beta xz - \delta y \\ z' = py - cz$$ $x_0=43100, y_0 = 0, z_0 = 0.0033$ $\lambda = 388, \rho = 0.009, \beta =3.61e-8, \delta = 0.18, p = 50000, c = 23. $ ...
0
votes
0answers
34 views

How to access the values of RootOf within a Struct in Matlab

I am solving a system of nonlinear equations in Matlab. The solution G returns a struct object and I can pull out the solution(s) x, y as S1=[G.x, G.y]. I cannot evaluate the values though. If I ...
0
votes
1answer
30 views

Matlab 'For' loop and line plotting [Beginners question]

function question2a(a,x) y=zeros(1000,1); y(1)=x; hold on; for j=2:1000 y(j) = a*y(j-1)*exp(-y(j-1)); plot(j, y); end hold off; end Is my ...
2
votes
2answers
50 views

Finite Element Method for the 1d wave equation

I'm solving the 1D wave equation \begin{equation} \frac{\partial^2 \eta}{\partial t ^2} - \frac{\partial^2 \eta}{\partial x ^2} = 0 \end{equation} with boundary conditions \begin{equation} ...
0
votes
0answers
29 views

Matrix of LP has not full rank after converison to standard form

I have coded a reader for MPS files in MatLab, which yields A, b and c as in ...
-1
votes
1answer
26 views

How to put a function in a function in matlab and plot it?

Now I am new to matlab, and now the basic syntax, however I am not sure how to write a function to loop for instance the following recurrence equation: $y(n+1)=\exp(-y(n))$ .. where $y(1) = ...
0
votes
1answer
29 views

Find least squares regression line

I have a problem where I need to find the least squares regression line. I have found $\beta_0$ and $\beta_1$ in the following equation $$y = \beta_0 + \beta_1 \cdot x + \epsilon$$ So I have both ...
0
votes
1answer
40 views

negative roots of a squared term in Matlab

I have an array of numbers, $B$, that can be written as $B = A^2$, where $A$ is also an array of numbers consisting of positive and negative numbers. If I take the square root of $B$ in MatLab using ...
1
vote
1answer
51 views

Mutual information for a continuous uniform distribution

I'm trying to compute using matlab the mutual information for an $ \infty $-PAM input (the limit of a very dense PAM constellation) for a range of snr and I got stuck. I'm working with a real-valued ...
0
votes
0answers
27 views

Plot in spherical coordinates in matlab

I have this vector function in sperical coordinate system $$\vec{E} =\frac{p}{4\pi E_{0}r^3}(2\cos(u) \hat{r} + \sin(u)\hat{u} ),$$ where $p$ and $E_{0}$ are known. I want to plot this function in ...
0
votes
0answers
20 views

Group method of data handling (GMDH)

The task is to build mathematical model using GMDH (Wikipedia) and peform a forecast. There is initial data: x1 = 2; x2 = 2; x3 = 6; y = 18; The selection criterion to be used is the regularity ...
1
vote
2answers
29 views

Plot the partial sums of a series - Matlab. [closed]

I want to plot the partial sums of the reciprocals of the squares between 1 and 10. So far, I've got the following code. It's something along these lines, but I can't quite manage it. I need to sum ...
1
vote
1answer
48 views

MATLAB fsolve giving wrong solution

I tried to solve equations of 3 spheres using MATLAB's fsolve function, but it is giving the wrong solution. here is my MATLAB function ...
0
votes
1answer
41 views

Why is the resultant of this $0$? What is this property called?

I have two column vecotors $A$ and $B$. I multiply all the corresponding elements of $A$ with the corresponding elements of $B$ and call the result $x$. Now I sum all the elements of $x$ and subtract ...
1
vote
1answer
35 views

Solving a nonlinear algebraic system representing the equilibrium of a system of ODEs

Given the following system: $$ a_1+(a_3+a_4)V-a_5WX = 0 \\ (a_7+a_4)Y-a_6WZ = 0 \\ a_2-W(a_4+a_5X+a_6Z)+(a_3+a_8)V+a_7Y = 0 \\ a_5WX-(a_3+a_8+a_4)V = 0 \\ a_6WZ-(a_7+a_4)Y = 0 $$ where $a_1$ to ...
0
votes
1answer
27 views

Efficiently find $x(k)$ where $x$ is given by $Ax=b$ and $A$ is tridiagonal

Say $A$ is a $n\times n$ ($n$ odd) real matrix that is tridiagonal (but need not be symmetric). What is the most efficient way to compute the value of $x(\frac{n+1}{2})$ (informally, the 'middle ...
2
votes
2answers
71 views

Error on Matlab and Wolfram Alpha?

I solved the differential equation $\frac{\mathrm{d} y}{\mathrm{d} x}= \frac{y^2-1}{2y}$, in the following way: $\frac{\mathrm{d} y}{\mathrm{d} x}= \frac{y^2-1}{2y} <=>$ $\int ...
0
votes
0answers
33 views

Riemann surface for $f(z)=\sqrt{z^2+1}$

How would I determine the form of the Riemann surface for the function $f(z)=\sqrt{z^2+1}$ taking the branch cut to be the imaginary axis for $Im(z)\in[-i,i]$? And is there anyway to plot this using ...
0
votes
0answers
37 views

Programming nested sums in Matlab for graph-based statistic

I have an undirected graph $G=(E,N)$, where $E$ is the set of edges and $N$ is the set of nodes, of which $|N|=n$. It's convenient to represent the edges via a (symmetric) adjacency matrix $B$. I ...
0
votes
1answer
34 views

Euler-Maruyama simulation of an SDE

The Euler-Maruyama method for the following SDE \begin{align} dX_{t} &= -\lambda X_{t}dt + \mu dW_{t}\\ X_{0}&=x>0 \end{align} where $\lambda,\mu$ are given constants, is (according to ...
0
votes
1answer
11 views

Solving Quadratic on Matlab (slightly more complex)

I am new to this site so I apologize if this post doesn't belong here or anything. I am trying to solve a quadratic on Matlab. This is relating to my electrical engineering circuits course where I ...
0
votes
0answers
18 views

Cannot take inverse fourier transform of a function

I am trying to get the inverse fourier transform of the following function: $$\frac{ (i*k)}{( 1 - e^{(i*k*T)} ); }$$ Where t is constant. Is there a way to approach this? I have tried the ...