# Questions tagged [matlab]

For mathematical questions about MATLAB; questions purely about the language, syntax, or runtime errors would likely be better received on Stack Overflow. MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks.

2,621 questions
Filter by
Sorted by
Tagged with
14 views

### Simplify non-linear system in MATLAB/Octave before solving

Background In my problem, as $V$ increases from $0$ to transitional value $V_T$, $J$ is better described by a function of $\alpha$, $\phi$ and $F=V/L$: \begin{equation}\tag{1} J=k_1F^{2\alpha}\exp(\...
8 views

### Formula for variance of “Discrete” Normal Distribution

Is there a formula based approach to estimate the expected StDev./Variance of a Discrete Normal dataset? Say if mean =0 and StDev. =1, then what would be the expected StDev. of resulting dataset (say, ...
49 views

### image of a two variable function in Matlab

Could anyone tell me how to plot the image of the following function in a two-dimensional plane in Matlab (R2018b) by possibly a Matlab code or command? I mean I want to see a curve in $\mathbb R^2$ ...
60 views

### Eigenvalues give $(\lambda I - A)$ rref to identity

This is my first post. I'm sorry I don't have mathjax. I'm working through some linear algebra problems, and I keep running into situations where $[(\lambda I-A)]$ (where $A$ is a matrix, $\lambda$ is ...
26 views

### LaPlace transform in Matlab

My transfer function in z domain is: $$\frac{B(z)}{A(z)} = \frac{(-0.0001988z^{-1} + 0.0005962z^{-2} - 0.0005963*z^{-3} + 0.0001989z^{-4})}{(1 - 1.11z^{-1} - 0.03133z^{-2} + 0.1665z^{-3})}$$ Ts = 0....
17 views

28 views

### Using variable index in matlab [closed]

If we have k=1:n, and then we put k in a function so we get fk=f(tk) for some values of <...
55 views

### Integration of multi-valued function

Graph I have a set of discrete (x,y) points and need to find the area between the curve and the y-axis. However, the curve seems to be a multi-valued function (multiple x for the same y). Is such an ...
15 views

### outage probs vs number of transmit antenna

Can some one please help me with a matlab code for plotting outage probability against number of transmit antennas in a Massive MI-MO System? i have tried plotting and keep getting single values that ...
37 views

### How to create a matrix from an equation in Matlab?

Let A = $(a_{ij})$ be the matrix with entries $a_{ij} = i^2+j^2$ A is a $N\times N$ matrix How can I construct a matrix from this equation?
29 views

### Estimating initial conditions of an ODE system using least squares

I am trying to estimate the parameter values of the differential equation, ${dN\over dt}=\lambda N$. I know how to estimate the parameter value of $\lambda$ but I am having trouble in estimating the ...
14 views

### Optimal approximation of nonlinear probability density function by piecewise constant density

Given a nonlinear probability density function F, the problem is to estimate F using histogram over a partition with N intervals. I have tried to realise this with MATLAB function fmincon, but it ...
30 views

28 views

### 4d Integral in matlab

I'm trying to evaluate the integral using MATLAB with an equation containing 4 related random variables, thus the boundaries of the integrals are not constant. There are 2 exponential pdfs, and 2 ...
36 views

### Cubic Bézier radius of curvature calculation

I modelled a racetrack using cubic Bézier curves. I understand that the representation is parametric: x and y vary with t. I have successfully created the cartesian coordinates thanks to this: https://...
65 views

### Using Matlab's fmincon to find optimal parameter of SDOF system having discrete white noise input

I am trying to use Matlab's fmincon function to find the optimal value of $k$ for the following ODE, which represents a mass-spring system, $$m\ddot{x}(t)+kx(t)=f(t),$$ where $f(t)$ is taken to be ...
21 views

### Plotting phase portrait for a system in MATLAB

I want to plot the phase portrait of the following system in MATLAB, $$\mathbf{X'}=\begin{pmatrix} 1 & 1 \\ 1 & 1\end{pmatrix}\mathbf{X}$$ so far this is the code I wrote ...
34 views

### fractional imaginary calculation

Assume $j=\sqrt{-1}$, to calculate $(-3.1416j)^{0.5}$ in Matlab, I type (j*-3.1416)^0.5 and it gives me the result: ...
45 views

### How to simplify exponential matrix complex output in MATLAB?

I want to use MATLAB to find $e^{\mathbf{A}t}$ for $$\mathbf{X'}=\begin{pmatrix} -3 & -1 \\ \phantom{-}2 & -1 \end{pmatrix}\mathbf{X}$$ this is what I wrote in the command window ...
25 views

### Estimating probability density function of big amount of data coming from Monte Carlo simulation

I am trying to estimate Probability Density Function (PDF) of a big amount of data ($1e^6$ , $1e^7$, and higher) coming from Mote Carlo (MC) simulation. My objective is to estimate the PDF (e.g. with ...
40 views

### Plots in MATLAB

Is it possible to generate by MATLAB, plots and subplots like the ones below? The plots come from an economics paper (http://people.bu.edu/sgilchri/research/GSSZ_FHMU.pdf) and I have looked at ...
26 views

### Fredholm determinant

Suppose we have a Jacobi unitary ensemble $W$ with eigenvalues $-1<\lambda_{1}\leq \lambda_{2}\leq \cdots\leq \lambda_{n}<1$. We can express the eigenvalue correlations near $1$ in terms of the ...
34 views

### How to find a non-singular sub-matrix in a full-rank matrix.

Suppose we are given $A\in\mathbb{R}^{n\times m}$, where $n<m$, and we know that $A$ is a full-rank matrix. What is a simple and efficient way to find any submatrix $B\in\mathbb{R}^{n\times n}$ ...
65 views

### How does MATLAB compute the real Schur decomposition?

Let matrix A be defined as ...
8 views

### BVP with intermediate constraints (Multipoint BVP?)

I have a scalar BVP in the form $$\ddot{n}(t) = f(n(t),\dot{n}(t),t)$$ with BCs $\dot{n}(0) = \dot{n}(t_f)=0$. In addition to these BCs, I have constraints on velocities as $\dot{n}=0$ at ...
20 views

### Is there mistake in derivation/simulation of Maximum A Posterori (MAP) estimation?

I'm trying to estimate $X$ using MAP Estimator. If $Y = aX + N$, where $a$ is a constant, $X \sim \mathcal{N}(0,\sigma_{x}^{2})$ and $N \sim \mathcal{N}(0,\sigma_{n}^{2})$. The likelihood function ...
10 views

### 2D Meshing of an Arbitrary Polygon in Matlab

I am trying to create meshing for an arbitrary polygon; such as, ...