# 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.

3,166 questions
Filter by
Sorted by
Tagged with
12 views

### generalized poisson moment function approach to initalize input output model

I am trying to understand how the Generalized Poisson Moment Functions apporach is a way to initalize the nominator and denominaor of a LTI-Model that describes the connection between Input and Output ...
1 vote
54 views

### Hadamard matrix of order 28 via Paley 1 construction [closed]

The Paley 1 construction method allows to construct an Hadamard matrix (square matrices with orthogonal columns and entries equal to $1$ or $-1$ ) of order N = q+1 where q = 3 (mod 4) is a prime power:...
• 31
18 views

### Generating MA Process in matlab using gaussian nosie

I have an MA process that is: $x[n] = a * w[n] + b * w[n - 1] + c * w[n - 2]$ Where $a, b, c \in \mathbb{R}$ and $w \sim \mathcal{N}(0, \sigma^{2})$ How can I generate $x[n]$ in Matlab ? I know that ...
9 views

### Understanding sentences in sptenrand() in tensor_toolbox

When I try to figure out the meaning of the codes of the sptenrand() function to write a function to create a sparse tensor with a different distribution, I am stacked in the following two steps: ...
1 vote
48 views

57 views

### Matlab code for solving inhomogeneous 1D heat equation using Crank-Nicolson

I'm trying to solve the 1D heat equation using Crank-Nicolson in Matlab. The problem is, my numerical solution is not the same as the exact solution. (I already checked the plots and their shapes are ...
24 views

### Convolution with a time shifted box function

I have the input: Delayed box input Its a box funciton x2(t-0.00225) with L = 0.0005 where it's 1 when 0.002 <= t<= 0.0025 and 0 elsewhere. I want to convolve this with the impulse funciton of a ...
31 views

### How to plot two seperate sequences in one plot such that there difference is clear?

Suppose I have two sequences $a_n$ and $b_n$. They both start from a very high number say $25000$ and converges to zero. If I plot them in one plot, as they start from a very large number, the plot ...
• 361
69 views

### Exploring Convergence and Root Determination with Fixed-Point Iteration

Understanding Fixed-Point Iteration: Exploring Convergence and Root Determination The equation $$2x^2 - 7x + 6 = 0$$ has two positive roots. We aim to determine these using the following fixed-point ...
• 1,237
11 views

### Logit panel with Simulated Maximum Likelihood

I'm testing a very basic logit panel model in matlab. The setup is as follows: We observe a binary variable $y_{it} = 1(\beta_0 + \beta_{it}x_{it} + \varepsilon_{it} > 0)$ where i is individual and ...
• 33
1 vote
59 views

• 11
61 views

### How to write mathematical ODE equation of PI controller, with saturation and rate limiter in differential equation form?

I want to write a mathematical ODE equation of PI controller, with saturation and rate limiter in differential equation form. I can write PI controller, but how to incorporate it with saturation and ...
• 41
1 vote
22 views

### Lognormal distribution notation

I have a problem where there is a lognormal variate, S = LN(30, 0.33). The Matlab code specified in the text to generate 10,000 sample values for S is S=lognrnd(log(30),.33,10000,1). My question is ...
25 views

### Matlab - Temperature data from 18 thermocouples, each with xyz coordinates, sampled at 1Hz. How could I make an animated 3D surface plot?

I've measured the temperature evolution in a box at 18 locations using thermocouples. I have 18 columns of temperature data in excel, each row being a time step of 1 second (sampling at 1Hz). Each ...
46 views

### How to solve an LMI feasibility problem with such an equality constraints?

My friend is now working on a simulation problem in control theory with MATLAB, where a linear matrix inequality (LMI) feasiblity problem needs to be solved at first. However, in this LMI problem, ...
73 views

### How to generate all the matrices with each entry of binary values in matlab?

Obviously, there are totally $2^{m\times n}$ matrices ($m$ and $n$ is the size of the matrix). I need a command to generate all of them. Example: for a $1\times 2$ matrix, there are all $4$ possible ...
10 views

• 401
1 vote
77 views

### Can I use the least square fitting to obtain a real solution of a complex equation?

I am trying to solve the following equation: $$\omega^{1/3} = p_l \omega_l^{1/3} + (1-p_l)\omega_{\omega}^{1/3} \tag{1}$$ $\omega$, $\omega_l$, and $\omega_w$ are complex numbers and $p_l$ must be ...
• 169