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
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 ...
0
votes
1answer
37 views

How to solve the eigenvalues of a complex matrix of very high condition number?

WHAT I FACE: I'm dealing with a complex matrix of very high condition number and I have to solve the eigenvalue and eigenfunction of it. But in Matlab, I got the problem that the results are not ...
0
votes
1answer
46 views

Using the Monte Carlo method to find a volume

Use the Monte Carlo method to find the volume of intersection of, three cylinders, all of radius 3 units and in finite in length,with the axis of the first cylinder being the x-axis, the axis of the ...
1
vote
1answer
53 views

Trouble with derivatives using Newton-Raphson in MatLab

I'm finding it very difficult to get my head around how best to express the following system of equations in MatLab in order to solve it. The equations come from Von Karman's similarity solution to ...
1
vote
1answer
41 views

Can not build a phase space for simple oscillator

2 question is: how to move out the particle from the potential well? I am stuck on a problem that I have a simple harmonic oscillation for which I want to draw a phase space. I can do this inside the ...
0
votes
0answers
17 views

How to define a unimodal function?

I am doing MATLAB assignment in which I need to find the minimum of a given 3D function. It is more or less guided, but I'm confused on what one step means: a. First, write a function that will ...
0
votes
1answer
15 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 ...
0
votes
1answer
35 views

Plotting piecewise functions on MATLAB [closed]

I wish to plot the piecewise function onto MATLAB: The interval I am concerned with is [-5, 5]. $$f(x) = 2x \text{ if } -5 \leq x < -3 \text{ and } 3 < x \leq 5$$ $$f(x) = 4 , -3 \leq x \leq ...
1
vote
1answer
33 views

Why do I get complex convergence?

I have problem with understanding why I get the complex convergence when using Newton-Raphson's method (own implemented) to the convergence tables down below: ...
0
votes
1answer
113 views

Solving a system of two second order ODEs using Runge-Kutta method (ode45) in MATLAB

I'm trying to solve the system of differential equations outlined in Von Karman's rotating disk flow. I got them into a system of ordinary differential equations: F(n), G(n), H(n) $$F'' = -G^2 + F^2 ...
-1
votes
0answers
42 views

How to formulate the following problem as a SDP problem

I am struggling with the following optimization problem: maximize $\mu$, subjected to $\left(\begin{array}{ccc} 4\mu-(2\alpha_{10}+2\alpha_{5}+\alpha_{2}+\alpha_{8}) & 0 & 0\\ 0 & ...
0
votes
1answer
40 views

How do I determine the transfer function of a plant?

I sitting here with a system which I have to determine the transfer function. The unit receives a velocity and position, and move towards that position with the given velocity. What kind of test ...
0
votes
1answer
48 views

N body ODE simulation

I have been staring at the below matlab code, which simulates planetary motion, for a while now and I could really use a fresh set of eyes. I cannot understand why it is giving straight line ...
-1
votes
0answers
15 views

Band Periodicity

this is one of sounds features and it has been used in some AI voice app. "The periodicity property of each sub-band is represented by the maximum local peak of the normalized correlation function." ...
1
vote
0answers
34 views

Problem with plotting a differential equation

I have problem with plotting an differential equation that is as following: $$ \frac{d^2y}{dx^2} + \pi y e^{x/3}\big(2\frac{dy}{dx} \sin(\pi x) + \pi y\cos(\pi x)\big)=\frac{y}{9} $$ where the ...
1
vote
0answers
31 views

Eigenvalues and eigenvectors for earthquake modeling

My instructor explicitly stated that, because we are asked to find eigenvalues and eigenvectors of a $7\times 7$ matrix, MATLAB would be easiest to use. The equation $(1)$ is intended to resemble ...
0
votes
1answer
34 views

Coefficients of a linear combination

Suppose I have a vector space $V$, with $\{\vec e_1, \ldots, \vec e_n\}$ forming a basis of $V$. Also, suppose that I have a vector $\vec x \in V$, which I want to express as the unique linear ...
0
votes
0answers
21 views

Help understanding Jacobi SVD

I found this link, and I want to complete this implementation of the Jacobi SVD method, but it isn't clear to me how to implement alpha, beta, and gamma. I think it's very clear that ...
0
votes
2answers
29 views

Assigning values to a vector in Matlab [closed]

I have this Matlab code: ...
0
votes
0answers
11 views

Angle between two lines formed by intersection of two planes with X = 0, Y = 0 and Z = 0 planes

I am new to linear algebra and have been struggling with a solution for this since long. I work on MATLAB. I have a set of points (as in Points3D.mat attached here). I find the equation of best fit ...
1
vote
1answer
31 views

First order non-linear ordinary differential equation

The following ODE is given: $a\pm\sqrt{b+c*(x(t)+d))}=e*x'(t)+f*x(t) $ from Matlab I'm able to get a solution for the differential equation (actually two solutions, one for the + and one for the - ...
0
votes
0answers
14 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
8 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 ...
0
votes
0answers
20 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
49 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
101 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 ...
1
vote
1answer
95 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
23 views

Matlab's for Genetic Algorithm Issue

...
1
vote
0answers
9 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 ...
0
votes
1answer
17 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 ...
0
votes
0answers
21 views

Applied Linear Algebra | Linear Dependent Matrix [duplicate]

My response: Am I correct in my approach? Thank you for your help.
0
votes
0answers
32 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 ...
-2
votes
1answer
25 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
57 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
39 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
18 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
48 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
44 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
58 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
36 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
43 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
22 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
31 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
63 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
28 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
47 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
38 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
19 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
37 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 ...