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

1
vote
1answer
16 views

Matlab, how do I change the default scatter plot size?

I am trying to do a approximation plot with Runge Kutta. In matlab, the discrete plot I use is "scatterplot". Unfortunately because of so many data points, the data points get mashed in and forms a ...
1
vote
1answer
25 views

AX=B in Matlab solution

I am new to MATLAB and wanted to solve a linear equation and come across a problem The matrix A is [ 3 6; 6 14] and B Is [ 5;11] According to ...
0
votes
0answers
6 views

creating smooth 2d plot with only a scaled colorvector and (x,y) coordinates | (matlab plotting issue)

I've an issue with visualizing the data in a correct way. I have an array with 3 colums and N rows. ...
0
votes
0answers
14 views

Plot symbolic function in MuPAD

I define a symbolic function in MuPAD as f:=A*cos(omega*t+phi) I'd like to plot (in 2D as function of t) that function for ...
0
votes
0answers
9 views

Plot given points\lines\arcs in 3D

I need to plot 6 points in 3D by using Matlab. I used the command 'plot3' but I couldn't draw it. The coordinates of points $A,A,B,B',C,C',D$ are given. $AD,BD,CD$ are straight line segments ...
1
vote
2answers
52 views

How to solve this equation numerically???

The equation is given by $$ \sum_{n=1}^N \min(\gamma, \beta a_n)=N$$ where $\beta$ is the variable with $\beta\in[0,\sqrt\gamma/\min(a_n\mid a_n>0)]$, $ \gamma $ is a constant with ...
1
vote
0answers
18 views

how to vectorize this kind of loop for array. [on hold]

I'm newbie to Matlab. I have some questions. How i vectorise this loop ...
0
votes
0answers
23 views

How to solve a bi-quadratic equation with symbolic coefficients?

I have the following equation with the symbolic coefficients specified using 'syms' which i have been trying to solve in MATLAB:- ...
3
votes
1answer
43 views

Runge Kutta stability

I am facing a problem solving a ODE with a Runge-Kutta 4th order method: The expression in order to solve is : \begin{equation} Ay^{''}+By^{'}+Cy= Cu \end{equation} \begin{equation} y =OUTPUT ...
1
vote
1answer
14 views

How to calculate a posterior probability with a given Gaussian Mixture Model?

I'm building a GMM-based classifier in speech processing and I'm using GMM as a probabilistic scoring mechanism (therefore I don't intrinsically care about the underlying mixture components). For ...
1
vote
0answers
38 views

How to solve the matrix equation $A\overrightarrow{x}=\overrightarrow{b}$ in Matlab when nullitity$(A)\neq 0$

Say, $A= \begin{pmatrix} 1 & 0 &1 \\ 0 & 1 &1 \\ 0 &0 &0 \end{pmatrix}$ and $\overrightarrow{b}= \begin{pmatrix} 8 \\ -5 \\ 0 \end{pmatrix}$ and I want to solve ...
1
vote
1answer
24 views

Replacing pinv with inv in MATLAB

Let $\mathbf{y} = \mathbf{Ax}$ represent a system of equations where $A\in\mathbb{R}^{m\times m}, x\in\mathbb{R}^{m\times 1}$. However rank of $\mathbf{A}$ is $m-1$. I add another equation ...
0
votes
0answers
18 views

How to perform the following integration using dblquad in MATLAB

I am trying to perform the following integration in MATLAB \begin{equation} \begin{split} F &= @(x,y)(e^{(-0.5([x - \mu_1 \hspace{5pt}y-\mu_2])\Sigma^{-1}([x - \mu_1 ...
0
votes
0answers
21 views

How to evaluate integral within an integral with symbolic limit in Matlab

I want to evaluate following integral which contains another integral inside. spol, which is a function of theta,is the lower limit of internal integral. The internal integral then will be multiplied ...
0
votes
0answers
7 views

Need help with getting 95% ellipse area of a 2D PSR plot [closed]

So I have been referring to the method of obtaining this as outlined in the following paper (pg 4 - 5): ...
-2
votes
1answer
61 views

creating mtabe using matlab [closed]

I was given the following task: . Write a function called mtable that returns mt an n-­‐by-­‐m matrix corresponding ...
-1
votes
1answer
58 views

Why is the following program not correct? [closed]

I was given the following task: Write a function called randomness that takes three input arguments: limit, n, and m, in that order. The function ...
0
votes
1answer
15 views

matlab matrix substitution without loops

below there is a task we were asked to do using matlab. I wrote this function below which works fine. But, since 'for' loops were not shown yet in the course, I think that the instructor meant doing ...
0
votes
2answers
41 views

Calculation of minimum infinity norm subject to L1 norm

Can somebody tell me how to evaluate the following in MATLAB or any other programming language? \begin{equation} \min_{x \in \partial \|w\|_1} \| x+y\|_\infty \end{equation} $x,w,y \in R^n$. $w,y$ ...
1
vote
0answers
17 views

Is there a map that maps the mean vector and the variance matrix of a multivariate lognormal to its location vector and diffusion matrix?

Suppose ${\xi} \sim logNormal_d ({\mu},{\Sigma})$, where $\mu$ is a d-dimensional vector (called location vector) and $\Sigma$ is a $d \times d$ symmetric positive definite matrix (called diffusion ...
0
votes
0answers
18 views

spline interpolation of 3 dimensional array

Iam trying to interpolate two files which are stored into array. here is the example of the files. File 1 : x y z 8 12 89 11 18 30 11 19 20 File2: x1 y1 z1 8 12 89 11 18 30 11 19 20 ...
0
votes
2answers
32 views

A question about the matlab error “Subscript indices must either be real positive integers or logicals” [closed]

I wrote a simple matlab code to evaluate the ground state energy of a set of tight-binding Hamiltonians with local magnetic impurities. I always encounter the subscript error until I add a new line, ...
0
votes
1answer
48 views

Numerically solving a system of partial integro-differential equations in Matlab [closed]

Given the following system of partial integro-differential equations - $\frac{dS(t)}{dt}=\Lambda-\mu S(t)-\beta S(t)F(t),\\ \frac{\partial I(t,\omega)}{\partial t}+\frac{\partial ...
-1
votes
2answers
23 views

How to compute the incomplete Gamma function with an negetive parameter in MATLAB?

I need to compute the upper incomplete gamma function $$\Gamma(-0.5,0.5r)$$ But in MATLAB, the upper incomplete Gamma function "gammainc" is defined as $$\Gamma\left(\alpha ; x\right) = ...
0
votes
0answers
82 views

How can I resolve this improper integral?

I would like to resolve this integral numerically . However, I'm not sure about the best way to do it because it is an improper integral: $$ ...
0
votes
3answers
60 views
0
votes
0answers
22 views

Is there an efficient $O(n^2)$ way to estimate in MATLAB a matrix condition number given its LDL decomposition?

Since evaluating a matrix condition number usually takes $O(n^3)$, I wonder whether there is an efficient $O(n^2)$ way to estimate in MATLAB a matrix condition number given its LDL decomposition. ...
1
vote
1answer
37 views

Please help me in finding matlab code

How do I find the max value and the unknown variables of ...
1
vote
3answers
32 views

Solve for x with an expression of independent variable in the exponent

I am helping a friend in research. I wish to solve for x, in this equation. $p, k, m, l, r\text{ and }h$ are all constants. They may vary, depending on the user's input, but they would all be ...
0
votes
0answers
44 views

Matlab Coding finding zeros without using fzero or roots function

So i am a completely new at Matlab. I'm basically suppose to develop a function in Matlab that finds the zeros of a cubic polynomial. real and complex. I'm pasting below what I have so far. I started ...
2
votes
0answers
25 views

Understand and Implement adjoint operator of gradient

I have an equation as With initial ui=vi; yi=0, tau=1; I am implementing eq. 4.19 and 4.20 in MATLAB. Hence, I would like to ask you something. The adjoint operator of gradient is similar the ...
0
votes
0answers
17 views

Run fmincon with different initial value [migrated]

I have an optimization problem with a nonlinear inequality. I wrote the MATLAB code using fmincon given below. Now, I want to run the code for different initial ...
2
votes
0answers
28 views

eigenvectors of a unit lower triangular matrix

I know that for a lower triangular matrix, its eigenvalues are equal to its diagonal elements. And if we assume a unit lower triangular matrix, its eigenvalues are all equal to 1 (since it is a unit ...
0
votes
0answers
19 views

multiplication between a matrix and a givens rotation

I want to multiply a matrix A with a givens rotation G. As a reference to this very important link:Click here, they explained in pages 13 and 14 how this multiplication can be achieved. In this PDF, ...
0
votes
0answers
129 views

Second order coupled differential equations

I am trying to solve two coupled ordinary differential equation. $x''+Ax'+By'+Cx+Dy=U$ ; $y''+Ex'+Fy'+Gx+Hy=V$ ; $A,B,C,D,E,F,G$ & $H$ are constants, $U,V,x$ and $y$ are function of time. All ...
0
votes
1answer
48 views

How can I make graphs in matlab?

for my thesis I have to include figures. I want to make a figure as the figure in the attachment, but since I am pretty new to matlab I do not understand the best way (I know this may be a many ...
0
votes
0answers
18 views

Direction of rotation in matlab/simulink

I have a general question. In Simulink, say you have identified an axis for a revolute joint (x,y,z):(1,0,0) and you plot the angle. Is the normal convention the right hand rule? In this case positive ...
0
votes
2answers
18 views

Losing out on precision when importing values from notepad to Matlab

Here is the notepad file which I am trying to import to Matlab. ...
0
votes
0answers
36 views

How to solve complicated systems of equations with exponentials?

I'm trying to solve the system of equations at the bottom of this image, I need to solve for Rohm, Rdf, Rct, Cdl, Cdf, and Voc in terms of the theta parameters so I can calculate them from the ...
0
votes
0answers
15 views

Generating bernoulli variables for different lambda's

In order to generate $M$ paths of length $N$ I have to generate Bernoulli variables. In Matlab I used: Q=binornd(1,lambda,L,N); Now I want to generate this for a sequence of values lf lambda, but I ...
1
vote
3answers
49 views

Symmetry Of Differentiation Matrix

I have a problem computing numerically the eigenvalues of Laplace-Beltrami operator. I use meshfree Radial Basis Functions (RBF) approach to construct differentiation matrix $D$. Testing my code on ...
-1
votes
1answer
39 views

Image restoration in matlab via PDE toolbox

I want to remove a noise for an image using matlab, when the observed image is $$f=u+v$$ where $u$ is the restored image (is the image i want recovered) and $v$ is the gaussian noise. To restore $u$, ...
0
votes
0answers
9 views

How to build an 2-D polynomial from 1-D orthogonal polynomials

I have an set of orthogonal polynomials such as I want to build an 2D polynomial following the equation $$P_k(x,y)=P_k(x)P_k(y)$$ where $k=1..4, (x,y) \in [-1, 1]^2$ Based on given $P_n(x)$ as ...
1
vote
1answer
19 views

System of separable diff. eqns, explicit solution and curves, Lotka-Volterra model

In the book on p.68 is a system of differential equations for a Predator-Prey model (Lotka-Volterra) given as: $$ \dot x=x(\alpha-c\gamma) \\ \dot y=y(\gamma x -\delta) $$ On the next page, it is ...
1
vote
0answers
35 views

Revert problem in Kronecker tensor product

I have a question related to reverting kron tensor product. As We can see the in below example: ...
0
votes
0answers
14 views

How to show remaining time in timer clock matlab on pressing ESC? [migrated]

I have a program given i want to show the time remains when pressing ESC in stopwatch so anyone help me in this program i want to show the time remains after pausing stopwatch in dialog on pressing ...
1
vote
1answer
26 views

More efficient algorithm for matrix rearrangement (MatLab)

Say I have the following matrix: $$A = \begin{bmatrix}0.1 & 2 \\ 0.1 & 4 \\ 0.1 & 6 \\ 0.2 & 3 \\ 0.2 & 2 \\ 0.2 & 7 \\ 0.3 & 10 \\ 0.3 & 7 \\ 0.3 & 5 ...
3
votes
1answer
43 views

Probability of True Positive of a random variable defined by an integral expression

$\newcommand{\Prob}{\operatorname{Prob}}$Let's assume that we have a random variable with the following pdf: \begin{equation} f_T(x) = \int_0^\infty f_T(x,g) \cdot f_{g}(g) \, dg = \int_0^\infty ...
2
votes
0answers
23 views

Distribution of $f(x,|h|)$, being $|h|$ rayleigh distributed

INTRODUCTION Let's supose we receive the following signal: \begin{equation} y[n] = hx[n]+W[n] \end{equation} where: $x[n] = Ae^{j2 \pi f_c t}$ is the transmitted signal $f_c$ is the carrier ...
2
votes
1answer
46 views

Classifying peak and valley *regions* of a histogram

I've been playing with a few ways of classifying contiguous regions of a histogram as: 1) peak, 2) valley, or 3) in-between bit. Global thresholding has worked minimally well for me so far, but I'm ...