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

How to compute this convolution in matlab?

The equation is as above, where $f_x$ and $f_y$ refer to axises in frequency domain, $x$ and $y$ refer to axises in space domain and $F$ refers to Fourier transform. My main problems lie on 1) how ...
0
votes
0answers
6 views

Generating volume constrained splines

Suppose I have a set of points in $\mathbb{R}^3$, $\{\vec{r}_1,\vec{r}_2, ...,\vec{r}_n\}$, suppose between points $\vec{r}_i$ and $\vec{r}_{i+1}$ there is an associated volume $V_i$. I want to ...
-3
votes
0answers
64 views

Puzzle to puzzle you:image [on hold]

Suppose 3 1D Signals x(t), y1(t) and y2(t) are given as x(t)=sin(40*pi*t); y1(t)=.5*sin(40*pi*t) and y2(t)=x(t)+y1(t). Left side =Right side Here,values of x(t)and y1(t)i.e.(Right side) are given ...
0
votes
0answers
14 views

What must probably be a very simple graph plotting in MATLAB

I've only recently started using matlab so I apologise for my inexperience but I am struggling with the last part of my assignment in which I need to plot different graphs in which my variable 'N' ...
4
votes
1answer
42 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 ...
2
votes
2answers
68 views

Fourier Decompositon

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 ...
2
votes
0answers
19 views

Multiple constraints optimization problem in matlab

How can I solve an optimization problem with multiple constraints in matlab? I am trying to solve for: ...
0
votes
1answer
23 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 ...
0
votes
0answers
20 views

Matlab's for Genetic Algorithm Issue

...
1
vote
0answers
7 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 ...
-1
votes
0answers
23 views

fast computation of complete elliptic integral matlab

I'm using matlab to compute complete elliptic integrals of first ($K$) and second kind ($E$). I'm having an issue with computational speed evaluating these integrals using matlab function ...
0
votes
1answer
8 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 ...
1
vote
0answers
8 views

0ut-of-sample variance (rolling window)

My objective is to calculate out-of-sample variance of various portfolios. I am currently working on the comparison of the constructed portfolios using out-of-sample variance criteria. I am going to ...
0
votes
0answers
20 views

Applied Linear Algebra | Linear Dependent Matrix [duplicate]

My response: Am I correct in my approach? Thank you for your help.
0
votes
0answers
31 views

probability of collision approximation,matlab,maple

I'm working in the field of communication network. I have this equation p=((1-(1-(((2.*(1-2.p))./(1-p-p.(2.p).^m)).(1./Wi))).^(n-1))) I want to solve for p, but I failed(maple and matlab), can ...
1
vote
0answers
29 views

How should I rewrite this code to not use feval? [migrated]

I recently finished a homework set in my Applied Numerical Methods class and did alright on it. However, my professor made a note to say I shouldn't use the feval() function because it's outdated. ...
1
vote
0answers
22 views

MatLab Single Value Decomposition [closed]

there is an error in this code that I cannot seem to find. I am trying to take a simple black and white image and preform single value decomposition on it. Here is the code I am trying to use. Link to ...
1
vote
0answers
15 views

create zero-order hold in matlab [closed]

I'm trying to create a zoh of a given signal, but the plot is weird. here's what I've done: given that: $|X(w)|=0 for |w|\ge7.5\pi$ ...
-2
votes
1answer
22 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 ...
1
vote
3answers
52 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?
1
vote
0answers
28 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, ...
0
votes
0answers
12 views

Total path lengths in MST in MATLAB

I have an adjacency matrix of MST of size (1200x1200) and I wish to find the total path lengths among nodes. I tried to use Dijkstra's algorithm for finding the total path lengths among the nodes. If ...
2
votes
1answer
43 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, ...
0
votes
1answer
40 views

Maximum likeliood estimation of variances of transformed variables

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 ...
1
vote
1answer
35 views

Matlab code for Jacobian and nonlinear function

Write the nonlinear system $x_1^3-2x^2=2$ $x_1^3-5x_3^2=-7$ $x_2x_3^2=1$ in the form $f(x)=0$. Compute the Jacobian J(x). Create the files sys.m and sys_jac.m that ...
1
vote
0answers
33 views

How can I interpolate the following data and get the equation?

I want to interpolate between three vectors which have 8 rows in each. For eg. X = [1 2 3 4 5 6 7 8], Y = [7 8 9 10 11 12 13 14 ], Z = [15 16 17 18 19 20 21 22] I want to find the equation Z = ...
0
votes
1answer
38 views

The Fourier transform of exp(-x)*heaviside(x)

I'm trying to understand the Fourier transform of Y=exp^-x. Since the term tends to -infinity I have to multiply Y by the heaviside function to set everything below 0 to 0 so I can successfully ...
0
votes
0answers
17 views

Root locus vs Matlab's root locus function

Today during a lecture out teacher was demonstrating Matlab's rlocus function, but before that he decided to do it on chalkboard. Below we have a simple transfer ...
1
vote
1answer
26 views

Displaying images on Matlab.

I'm working on image denoising problem and I have develop an optimization algorithm in Matlab for this prupose. The images are in a 256 grey level scale so mathematically what I have is a map from ...
1
vote
0answers
55 views

solving PDE with state-dependent boundary conditions

I am interested in solving the following PDE (heat equation): $$\frac{\partial u}{\partial t} = \kappa \frac{\partial ^2 u}{\partial x^2}$$ In order to solve it, I discretize space uniformly into $N$ ...
2
votes
1answer
25 views

Where can I find an algorithm to compute $\min_{x \in \Delta_n} \langle g , x - y \rangle_1 + c\lvert x - y\rvert_1^2$?

I wish to compute the minimizer of $$ \min_{x \in \Delta_n} \langle g , x - y \rangle + \frac{c}{2}\lvert x - y\rvert_1^2$$ where the subindex $1$ indicates that the norm is the $1$-norm and ...
0
votes
3answers
32 views

Applying numerical integration twice (trapezoidal rule)

This is basically a programming exercise in matlab but I do not understand the math behind it. Say, that I have an ...
0
votes
0answers
17 views

two parameter bifurcation diagram using matcont

I am on my final project and I am trying to create bifurcation diagram using matcont. I tried over and over again but I cannot create bifurcation diagram as shown in the paper I cite. The upper ...
0
votes
0answers
13 views

Fourier Series from a simple sinosoidal function

I have a function of: Vd = (Rd/(33e3+Rd))*(Vrf*sin(Wrf*t)+Vlo*sin(Wlo*t)); y_t = 11*Vd; func_ = y_t; where: ...
0
votes
0answers
22 views

How to wrap 2D image around a circular arc?

How to transform rectangular image to image that is bent at certain radius? On the plot the center line follows the radius which is 2. Conformal transformation would be this, but there should be ...
4
votes
1answer
33 views

How can I compute $\sum_{i=1}^n x_i \log(x_i)$ in a stable manner?

Given a vector in $\mathbb{R}^n$ I have an algorithm to compute $$\sum_{i=1}^n x_i \log(x_i)$$ However for my application the norm of $x$ must be 1, hence for big $n$ the components tend to be too ...
2
votes
0answers
27 views

Evaluating a triple integral in Matlab using the trapezoidal rule

Can someone please explain to me how evaluate a triple integral in matlab using the trapezoidal rule. I have to evaluate a triple integral with six digits of accuracy and these limits: $0\leq x ...
2
votes
1answer
44 views

How to write ODEFUN's with y prime's? [closed]

I'm attempting to solve: $$ y'' = 3y-2y' $$ My work is basically... $$ y' = u $$ $$ u' = 3y - 2*y' $$ Now, I'm trying to write a solver for ODE45... but I can't figure out how I should write the ...
1
vote
0answers
39 views

Frequency of non-increasing and non-decreasing subsequences in Matlab

Having a sequence of numbers of length L, I need to count how many non-decreasing and non-increasing sub-sequences of exact length are there. For example, if I have a sequence of length 15 $$2, 4, ...
0
votes
0answers
24 views

how to solve ordinary differential equations with time varying delay in matlab?

I have to solve a system of ordinary differential equations of the form: d x[t] = A * x [ t ] + Ad *x[ t- d ( t ) ] where the delays d(t) its also time dependant and is given by d ( t ) = round ( ...
1
vote
1answer
27 views

$H_\infty$ norm of a transfer function by Matlab

Consider the simplest case: $$H(z) = \frac{z+1}{z+2}$$ I use two methods to find $H_\infty$-norm: ...
1
vote
1answer
26 views

Find local truncation error

We have the method $$ y^{n+1}=y^n+h \cdot [\rho \cdot f(t^n,y^n)+(1-\rho) \cdot f(t^{n+1},y^{n+1})] ,\quad n=0,\ldots,N-1 \\ y^0=y_0 $$ I have to calculate the local truncation error for the method ...
-1
votes
0answers
16 views

Solving Quartic Functions in Matlab

Is there a function or script to download for solving Quartic Formula? by a function, I mean the analytical solutions and not as an optimization problem.
0
votes
0answers
11 views

Power series expansion of a transfer matrix in Matlab

As an example: $$H(z)=\left[\begin{matrix}\frac{3}{z+3} & \frac{5}{3z+3} \\ \frac{3}{z+4} & \frac{5}{2z+1} \end{matrix}\right]$$ How to use matlab to write $H(z) = ...
0
votes
1answer
17 views

how can I plot the infinite sum in matlab [closed]

I'm lookin for a way to plot $$\hat x= \sum_{n=-\infty}^\infty 0.5cos(1.3\pi n)sinc(t-n)$$ in matlab, and I can't find out how
0
votes
0answers
21 views

Singular value decomposition positive components

I am using Singular Value Decomposition (SVD) applied to Singular Spectrum Analysis (SSA) of a timeseries. ...
0
votes
1answer
25 views

How to find the $H_2$ norm of MIMO system in matlab

$K$ is given. $A,B_1, B_2, C_1, C_2, D$ are also given. I want to find the following: $P_{11}, P_{12}, P_{21}, P_{22}$ And use the resulte in 1., to find the $H_2$ norm of the system: ...
2
votes
3answers
124 views

Numerical estimates for the convergence order of trapezoidal-like Runge-Kutta methods

I have to calculate approximations of the solution with the method $$ y^{n+1}=y^n+h \cdot [\rho \cdot f(t^n,y^n)+(1-\rho) \cdot f(t^{n+1},y^{n+1})] ,\quad n=0,\ldots,N-1 \\ y^0=y_0 $$ for various ...
-1
votes
1answer
27 views

Represent mode of a probability distribution.

I am finding it difficult to represent a simple analysis done in Matlab in equation form. The operation is of two step. Bin a data in 10 bins. (the distribution is unimodal) and then find the bin ...
0
votes
0answers
29 views

Normal form calculation

I am working on a problem involves 4 dimensional dynamical system. Is there any ready package (for maple ,matlab...) which calculate the normal form of nonlinear continuous dynamical systems? The ...