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

2
votes
1answer
43 views

I don't understand the mathematical meaning of mse value in lscov function for matlab

We have the following system $$Y = A X$$ Using least-squares, an estimate of $X$ is $$\widehat{X} = (A^H A)^{-1} A^H Y$$ And thus the mean square error for me is: $$\mbox{MSE} = \mathbb E[ \|(Y - ...
2
votes
1answer
34 views

Least Squares Algorithm with Inverse Norm

Given an overdetermined linear system $A \in \mathbb{R}^{m \times n}$, $b \in \mathbb{R}^{m \times 1}$ with $A < 0$ and $b < 0$. What is a good way to numerically determine $$ \min_x \left\lVert ...
-1
votes
0answers
12 views

Integrate a multivariable funtion w.r. to one variable or make triple improper integral

I am using Matlab 2010Ra and I want to do triple integration on my function below: My function (first Fock state): $$ \psi(x) = \frac{1}{\pi^{\frac{1}{4}}} e^{-\frac{x^2}{2}} $$ In fact I have a ...
0
votes
0answers
14 views

how do I find out the speed at which an equation changes it's direction to come up with an appropriate interval for my Bisection method

I want to use bisection method to find all roots of an equation within a given domain. my algorithm logic is very simple , divide the given domain into sub domains such that for any given sub-domain ...
0
votes
1answer
23 views

How do i write a matlab code that asks to input a funtion, and then uses that function in the rest of the program? [on hold]

I want to write a matlab code that asks for us to enter a function, number of iterations and two endpoint values , and then uses bisection method to solve for the roots of the function. I have looked ...
0
votes
1answer
32 views

help with finding roots using excel or matlab

I've been asked to finding the roots of the equation $x^3-6x+2=0$. They've called it the 'pivot method' but I can't seem to find the 'real' name of it. I've looked at secant, newton, bisection etc... ...
0
votes
0answers
31 views

Searching for a program to evaluate linear equations

I have a mechanical / geometrical system that is defined by certain equations. For some variables, I know that they are known, some of them are constant. I would like to have a software (freeware) ...
1
vote
0answers
22 views

creating a loop and maybe a potential loop within a loop in matlab [closed]

I'm extremely new at Matlab so would like some help. I'm trying to create a loop and maybe a loop within a loop, I'm not too sure at the moment but here's what I'm trying to achieve. I began with ...
0
votes
0answers
25 views

Nested symsum and symprod.

I am trying to use fmincon to find the values of $w_j$ which minimize the following monster (wherein t is a known constant): $$\...
0
votes
0answers
7 views

Parabolic cylinder function implementation using Matlab? [closed]

I would like to ask about the implementation of the Parabolic cylinder function using Matlab?
1
vote
0answers
17 views

Doubt about SVD algorithm

I am studing the SSA (Singular Spectrum Analysis) algorithm and after reading some papers about SSA, the ideia was not consolidated. I found a Matlab SSA algorithm here and I was trying to implement ...
2
votes
2answers
41 views

Maximizing a convex quadratic function in CVX and Matlab

I understand that a convex function can not be maximized as there is no such value. However, consider the following function: $$\begin{array}{ll} \text{maximize} & 3x^2 + 5y^2\\ \text{subject to} ...
0
votes
0answers
22 views

Exponential curve fit with MATLAB's fit function does not deliver good fit

I am trying to use MATLAB's fit function to fit a curve through a data set which obviously shows an exponential decay. These are the commands I use: ...
0
votes
1answer
43 views

Comparing $f(x)$ and the $f\_approx(x)$ in Matlab, Octave or Mathematica/Wolfram

I have a function $f(x)$ and I wrote the approximation for $f(x)$ as $f\_approx(x)$ which is a simple algebraic formula with sums and products . I now want to study the 2 functions side by side and ...
0
votes
0answers
26 views

matrix multiplication result value range

Here is the initial question: About the output value range of LeGall 5/3 wavelet Today I found actually the transform can be seen as a matrix multiplication. It is easy to calculate the wavelet ...
1
vote
0answers
22 views

The range of the coefficients of 2 level Wavelet LeGall 5/3 2D transform

As in the title, I am confused about the range of the coefficients of Wavelet LeGall 5/3 (has to be exact this filter) 2D transform (only for a 8*8 block) if the value of the input matrix are within ...
0
votes
0answers
13 views

Continuously Delayed DDE

I am interested in solving numerically a system of six differential equations of the form: $$\frac{d\psi_{i}}{dt}=f(\psi_{j=1,...,6},\int_{t-\tau}^{t}\psi_{i}(t')dt')$$ I have read about DDE's (...
1
vote
1answer
26 views

The problem of ksdensity plot in Matlab

I want to verify that random numbers generated by exprnd match the exponential distribution. I used Matlab's ksdensity function –...
1
vote
0answers
15 views

Zero-centering a kernel matrix?

I'm trying to implement the algorithm in this paper. As you can see at page 4, it is explained how to 0-centering a pxp symmetric Kernel matrix ...
0
votes
0answers
17 views

Operator Splitting, Piecewise Function, ODE,PDE,Matlab code [duplicate]

$t_f=1$ $$y(t) = \begin{cases} e^{2t},& 0 \le t \le t_f/2 \\ 2\left(t-\frac{t_f}{2}\right)+e^{t_f} , & t_f/2 \le t \le t_f \end{cases}$$ How can i write this piecewise function in ...
0
votes
1answer
14 views

Square Root of a matrix: transpose or inverse of eigen vectors?

Here is described that the square root of a matrix is defined as K^1/2 = V*D^1/2*V^-1 At the end of scetion 4 of this paper we can see W = K^-1/2es In the ...
2
votes
0answers
30 views

how to use matlab to calculate double integration?

I want to use Matlab to verify the result of double integration. $$\int_{-w}^{w}\int_{l}^{x}e^{ay}\space dydx$$ I tried this one ...
0
votes
0answers
11 views

Fitting to a convolution function in MATLAB

I have a set of spatial intensity curves that I believe arise from the convolution of a flathat beam intensity profile with a normal distribution curve (or set of normal distribution curves) that are ...
0
votes
1answer
26 views

using pinverse vs gauss-jordan to solve a possibly singualr system of linear equations?

so i have a possibly singular coefficient matrix A . (it's sometimes singular and sometimes not !) (in the case of singularity it has many solutions we only need one) i know using an inverse to find ...
0
votes
0answers
8 views

Reassembling a matrix from submtrices in MATLAB

Here I have an image X defined as follows: X=imread('sunset.jpg'); So X is a matrix. Now I subdivide the matrix into $8\times 8$ submatricse as follows: $$B = mat2cell(X(:,:,1), 8*ones(1,...
0
votes
1answer
16 views

Passing variables into function (MATLAB)

I am creating a function that perform multiple regression in MATLAB. The function is created as function [Beta] = george_linreg(y,x1,x2,x3,....,xN). I don't ...
0
votes
1answer
46 views

Why is cos and sin used in plotting this phase portrait

I'm plotting the phase portrait of the following system of ODE: $\frac{dx}{dt} = x + 3 y$ $\frac{dy}{dt} = -5 x + 2 y$ The code I have in matlab: ...
-1
votes
0answers
25 views

How to find the maximum of an implicit function in matlab

I have an implicit function with 2 variables x(1) and x(2). The variable x(2) can not be written explicitly in terms of x(1). I would like to find the value of x(1) that maximizes x(2). The implicit ...
1
vote
1answer
87 views

how to solve $ \int \frac{ e^{4cy^3+2by^2 + (a-3c)y - b}} {\sqrt{1-y^2}} dy $?

here $a,b,c$ are constants it can be solved as indefinite integral or a definite integral with limits [-1,1] or [0,1] MATLAB is not helping here
0
votes
0answers
13 views

Unknown normalization

I am trying to do BPP imaging and have been trying to replicate the algorithm in "Photoplethysmographic imaging of high spatial resolution" however I've ran into a problem. They say they normalize ...
0
votes
0answers
9 views

How to put constraint on the rank of a matrix to be completed using CVX toolbox [migrated]

I would like to complete a matrix using cvx toolbox in MATLAB. For example: ...
1
vote
0answers
58 views

Finding the roots of a nonlinear equation

Hello I am trying to find the real root of this equation \begin{equation} \mathrm{x}-\mathrm{y}-\frac{\mathrm{j}\,{\left(4\,{\left(\mathrm{t}+\frac{\mathrm{a}}{\mathrm{j}}\right)}^2+\frac{4\,\mathrm{v}...
0
votes
0answers
16 views

How do I plot this second order distribution in matlab?

http://imgur.com/ChrocF9 I'm trying to do a problem for heat transfer. I understand what's going on conceptually, but it wants me to do a 2D temperature plot in Matlab and I am stuck. The symmetry ...
0
votes
1answer
35 views

Expected value is equal to $\infty$?

Given the following set: $$ M=\{2^k | k \in\mathbb{N}_{>0}\}=\{2,4,8,16,...\} $$ Now we chose randomly some elements. For this we have to define a distribution: $$ P(m\in M)=m^{-1} $$ As can be ...
1
vote
2answers
77 views

integration of exp(cos(x-a)) dx

I would like to compute either of the following integrals: $$\int e^{\cos(x-a)} \, dx$$ or $$\int_{-\pi}^{\pi} e^{\cos(x-a)} \, dx$$ In both cases, $a$ is a constant. MATLAB doesn't seem to be ...
0
votes
0answers
39 views

How to integrate discrete data by Gaussian quadrature method

I'm trying to numerically integrate discrete data by Gaussian quadrature method. The file attached test.mat is a discrete data set taken from a finite-element mode ...
0
votes
0answers
11 views

MIMO static decoupling matrix

I am trying to implement a static decoupling matrix of a MIMO system in MATLAB Simulink. This static decoupling matrix is of size 2x2 with some complex numbers, and the control scheme used for ...
0
votes
0answers
16 views

How many eigenvectors can a real, symmetric, sparse matrix have?

I'm attempting to diagonalise a sparse, real and symmetric matrix H in MATLAB, using [F, E] = eigs(H, size(H,1)). This however ...
1
vote
2answers
64 views

How to calculate matrix rotation

Given the following rotation matrix $$\left[ \begin{matrix} -1/3 & 2/3 & -2/3 \\ 2/3 & -1/3 & -2/3 \\ -2/3 & -2/3 & -1/3 \\ \end{matrix} \right]$$ ...
1
vote
0answers
24 views

Matlab double integration result does not match with my self calculate

Here is a double integration, self learning $$ P=\int_{-w}^{w}\int_{l}^{\frac{y_h(x_b+w)}{x_h}+l}\frac{1}{2}\operatorname{erfc}\left[\frac{\log{\frac{z_h(y_b-l)}{y_h}}-\mu}{\sigma\sqrt2}\right]\space ...
-1
votes
1answer
62 views

How to implement twice MATLAB integral build-in function for numeric integration? [closed]

Suppose we have a function $F(\lambda) = \int\limits_{\lambda}^1 f(x) dx$, where $f(x)$ has no formula for antiderivative. We can easily calculate it by means of build-in MATLAB functions. Let's use $...
0
votes
0answers
28 views

Plotting $\sum_{n\geq 1}\frac{1}{n}z^{n}$ for $|z|<1$ (the natural boundary): Coding

As part of my tutorial, I would like to show the plots of a)$-\sum_{n\geq 1}\frac{1}{n}z^{n}$ and b)$Log(1-z)=log(|z|)+iArg(z)$, to drive home the point of analytic continuation. Plotting the Log is ...
1
vote
1answer
23 views

Plotting flux tubes on the surface of a sphere on matlab

I've been given the task to plot two flux tubes on a surface of a sphere, where one of the tubes twists around the other (to model magnetic helicity). I know how to generate a sphere in Matlab, and ...
0
votes
0answers
9 views

Specifying Correlation Within Clusters

So, I am looking to generate data which is correlated at a group level with a specified level of correlation. That is, suppose if I drew a certain number of $y_{ig}$ observations from the standard ...
3
votes
3answers
70 views

Find equation for line segment

I already know that the standard equation for a line is $y=mx+b$, but what if i want the line to have specific endpoints and not go on forever. For example the equation for a line beginning at $(3,1)$ ...
2
votes
3answers
190 views

Minimizing $\|Ax\|_2$ subject to $\|x\|_2 = 1$

I have a Matlab program to estimate a vector $x$ from noisy measurements. I use the singular value decomposition (SVD) to solve the linear equation $Ax=0$ (where the number of equations is greater ...
0
votes
0answers
15 views

How to get best fitting model decision for data X and Y in e.g. Matlab?

I have two sources of data, X and Y, which are basically counts, from 23 individual origins (3D ROIs in my case). For example: ...
0
votes
0answers
9 views

Phase correlation vs. normalized cross-correlation

In 2-dimensional discrete signal analysis (specifically image processing), a definition I found for the normalized cross-correlation between two images, both of size MxN $g_1(x, y)$ and $g_2(x, y)$ is:...
0
votes
0answers
23 views

Design with Matlab the equation of the position of a drone

I want to design with Matlab the equation of the position of a drone which is $u=m(\ddot z_{des}+K_pe+K_v\dot e+g)$ where $e$ and $\dot e$ can be calculated from the current and desired states $(z,...
0
votes
0answers
22 views

How to find the result of a differential equation in Matlab?

Given a variable $x$ defining the position of a drone, $\dot x$, its velocity, how do we find its acceleration $\ddot x$ in mathlab? I know that we can found the solution of a differential equation ...