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
1answer
15 views

Difference in using mldivide and pinv in MATLAB with over-determined system and rank deficient [on hold]

I am dealing with the problem $\mathbf{Ax} = \mathbf{B}$ and my problem is over-determined problem and matrix $\mathbf{A}$ is rank deficient. As we all know we can solve this in a least square sense ...
0
votes
0answers
7 views

MuPAD AxesTitleFont [on hold]

I want to plot a 3D plot in MuPAd with different fonts for the three axes. The X and Y axes shall be in normal letters while the Z axis should be a greek letter. If I use AxesTitleFont=["Symbol"], all ...
0
votes
1answer
12 views

What is the sample rate? [on hold]

I am a bit confused when i use matlab and create a linearly spaced vector linspace. I when i usually want to create a data set I use ...
1
vote
1answer
36 views

Cholesky algorithm

Good afternoon everyone, I'm in need of a factoring algorithm cholesky and algorithms to solve upper and lower triangular systems, but I'm not finding any work in that octave. Recalling that need the ...
2
votes
3answers
44 views

Least Squares method and Octave/Matlab [on hold]

I'll try to be as clear as possible so that you understand what I'm trying to do and can help me I have twelve pairs of data $(x_1,y_1),....,(x_{12},y_{12})$ and from this data we established a model ...
0
votes
1answer
23 views

randomly rough surface by ifft : real output from ifft

I'm trying to generate a randomly rough isotropic surface with predefined roughness amplitudes (standard deviation of heights). Suppose I have the absolute values of fourier components of the surface ...
0
votes
0answers
6 views

Sorting signals to achieve highest possible similarty

I am currently trying to develop an algorithm in Matlab that sorts signals, which I have as columns of a matrix, to achieve the highest possible similarity of the signal with its neighbors. My first ...
-1
votes
0answers
24 views
0
votes
1answer
35 views

MATLAB: minimize function using x value from previous iteration

I'm trying to develop an algorithm for a proximal point method defined as: $$ \underset{x \in \rm I\!R^n}{\arg\min} f(x) + \lambda g(x) $$ where f(x) is a convex and coercive function and also ...
0
votes
1answer
41 views

solving Non-liner optimization with non-liner constraint using fmincon in Matlab [on hold]

I'm trying to solve a non-liner optimization problem with a non-liner constraint by applying fmincon function in matlab. However, I got the following error: "Failure in initial user-supplied nonlinear ...
4
votes
2answers
46 views

Implementing Ornstein–Uhlenbeck in Matlab

I am reading this article on Wikipedia, where three sample paths of different OU-processes are plotted. I would like to do the same to learn how this works, but I face troubles implementing it in ...
2
votes
1answer
75 views

Evaluate integral over complex path numerically to show that $C_\infty$ is equivalent to $-I$

I would like to evaluate $$C_\infty = \int_{R = -a}^{R = a} H_0^{(1)}(z) e^{-izt} dz $$ where $H_0^{(1)}(z)$ is the Hankel function of the first kind, $a \rightarrow \infty$, and $$ z = R - i ...
-1
votes
1answer
17 views

Intersection points of curves in MATLAB [on hold]

I need to use the intersection point of two random curves, which I derive by plotting experimental data points(random arrays), in my MATLAB for further programming. Is it possible for me to get those ...
0
votes
0answers
18 views

A Matrix Function Exponentiated (matlab) [on hold]

I have a constant matrix A, and a vector t. I want to have $$E=e^{At}$$ I managed to do this with a code I wrote myself: ...
1
vote
2answers
23 views

Secant method with two ODE's of degree 2 - matlab

$$\frac{d^2r}{dt^2}-r\left(\frac{d\phi}{dt}\right)^2=G\cos\alpha-g\frac{R^2}{r^2}$$ $$r\frac{d^2\phi}{dt^2}+2\frac{dr}{dt}\frac{d\phi}{dt}=G\sin\alpha$$ The two ODE's above are given. I have written ...
-1
votes
0answers
15 views

Matlab angle over time diagram [closed]

Im trying to create a matlab plot like the one following where it shows the progression of a pendulum over time, I have arrays filled with the time values and corresponding angles. Is there anyway I ...
0
votes
2answers
46 views

please how to rotate a matrix $5\times4$ by 45° around the origin $(0,0)$? using matlab

Suppose I have a matrix $M$ of $5\times4$ dimension (this is represent an image) : M = [3 4 8 9; 1 6 7 3; 9 8 3 1; 1 2 2 0; 7 2 3 5]; ...
0
votes
0answers
13 views

Covariance from Gaussian Mixture Model versus direct calculation

I have a random variable $T$ which can be expressed as follows: $T=c_1P\cdot f+c_2Q$, here $\cdot$ denotes point-wise multiplication. $c_1,c_2$ are scalars and treated as constants. Distribution of ...
0
votes
0answers
32 views

Why do I get a big error when I compute this integral with Gauss-Legendre Quadrature?

I'm using Gauss-Legendre Quadrature to solve the following integral: $\int_0^{1}x^xdx$ After I've compared the result with the MatLab vpa(int(...)) of the same integral I've noticed that the ...
0
votes
2answers
34 views

Rational function regression without poles in a interval, or polynomial regression with positivity constraint

I have some sets of experimental data for some functions $f_i$ from $I=[0,1]$ onto itself, which should satisfy the following physical constraints: $f_i(0)=1$ $f_i(x) \in I= [0,1] \; \forall x \in I ...
0
votes
1answer
44 views

Are my results realistic or is there an error somewhere?

The background is that I'm solving a problem in Numerical Analysis which I asked about here: Is my derivate correctly programmed? Now if I use the new code, then I get a result that is along the ...
0
votes
1answer
56 views

Is my derivate correctly programmed?

I'm solving a problem in numerical analysis, page 9 of this text (soundwaves under water) and I think that I'm getting the correct result but I'm not sure if I programmed my derivate correct. My ...
0
votes
0answers
8 views

Generate feature vector matrix given mean and covariance matrix

What should be the steps i should follow for the following question using MATLAB generate matrix X which has 400 columns of feature vectors, first 200 columns from class 1, then 200 from class 2. ...
0
votes
1answer
23 views

Dot product of a sinusoid with a complex tone in Octave

I am trying to figure out how to solve this problem; Now make a new sinusoid with amplitude 1 and frequency 1000Hz. Calculate the dot product of this sinusoid with your complex tone using ...
1
vote
1answer
33 views

How to program a little code that shows me the evolution of the system when starting with initial values?

I have rather no programming skills, neither with Matlab nor with other languages. I need a little "program" that shows me the evolution of a dynamical system when giving it some initial values. The ...
1
vote
0answers
18 views

problem implementing leave-one-out cross validation for optimal bandwidth in Matlab

I'm trying to solve an exercise in which I need to calculate the local constant kernel estimator and provide the bandwidth using leave-one-out cross validation. The idea is that I need to sort of ...
1
vote
0answers
24 views

How can we formulate the art gallery problem as a mixed-integer linear program?

Specifically, how would one go about using 'intlinprog' in MATLAB to get a minimum value for the cameras required in a polygon-shaped art gallery? In other words, I think that what I am looking for is ...
0
votes
1answer
28 views

Differential equation concerning echolocation

I am in the process of trying to solve a differential equation using MATLAB. Given information is the following: $$ c(z) = 4800 - 20.2090 + \frac{17.3368z}{1000}+272.9057e^\frac{-0.7528z}{1000} $$ ...
1
vote
0answers
14 views

Must Number of equality constraints and decision variables be equal?

Must Number of equality constraints and decision variables in an optimization problem be equal ? If not, how can I solve the equality constraint equations with a solver e.g. ...
2
votes
0answers
53 views

Theoretical and computational results of ODE differ a lot! Why?

Hello. I have a problem in that my theoretical and practical(computational) calculations differ a lot. in 1 order of magnitude actually. Impulse I needed to jump over the saddle point in one ...
1
vote
0answers
13 views

Difference between impulse and step response.

My question is quite simple but I have some difficulties finding an answer to it. I was wondering what was the difference between the impulse and step response functions in MATLAB. The "help" section ...
0
votes
1answer
37 views

Matlab - Change Euler notation into sin(t) and cos(t) [closed]

I was wondering if I could convert my state transition matrix into sin(t) and cos(t) instead of Euler representation. Here is my ...
0
votes
1answer
30 views

Real logarithm of a real matrix?

What is the real logarithm of \begin{equation} \begin{pmatrix} -1 & 1 & 0 & 0 \\ 0 & -1 & 0 & 0 \\ 0 & 0 & -1 & 1 \\ 0 & 0 & 0 & -1 \end{pmatrix}? ...
0
votes
1answer
28 views

How to find Parameters in nonlinear Regression Model?

I have a nonlinear Regression Model with eleven observations of $x,y$. How do I find the parameters $a,b,c,d$ of the model: $ y=f(x)=a + b \sin cx e^{dx}$ by using the function: $$\Phi(a, b, c, ...
-1
votes
1answer
27 views

how to check data fits gamma distribution in MATLAB ?

I have two vectors which also contain zeroes. I cannot remove the zeroes as that is also data. I have to see whether my data fits gamma distribution or not. How can I check that?
1
vote
1answer
40 views

How can I solve numerically this partial differential equation?

I am reading this paper and came across a system of differential equations with 4 ODEs and 1 PDE. The PDE is given below. My question is how to solve this numerically in MATLAB , Python or ...
0
votes
1answer
48 views

Solving an equation in matlab

I would like to solve the equation: 1/2*logninv(x, 0.03-1/2*0.2^2 + log(100), 0.2^2) +1/2*logninv(x, 0.03-1/2*0.1^2 + log(100), 0.1^2) == 100 I can solve this ...
0
votes
0answers
4 views

What is the meaning of the output weights of a Conditional Random Field (CRF) model?

Problem When train my linear chain CRF with annotated observations, I feed it with a number of sequences containing observation values and a "ground-truth" label for each observation. I'm currently ...
0
votes
0answers
38 views

How to solve this ODE numerically?

I have a question about how to solve this ODE numerically: $$\frac{C}{4}y'^2+\frac{C}{4}y''y+(0.098)^2y''y'''=0$$ where $C$ is a constant and the initial conditions are $y(0)=y''(0)=0$ and $y'(0)=1$. ...
0
votes
0answers
12 views

Plotting Non Linear Programming functions

I define these functions in Matlab: ...
0
votes
2answers
60 views

Matlab Monte Carlo Method Volume Calculation

The question: use the Monte Carlo method to find the volume of intersection of, three cylinders, all of radius 3 units and infinite in length,with the axis of the first cylinder being the x-axis, the ...
0
votes
0answers
44 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
45 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
0answers
6 views

Can low order methods for solving ODEs be non-stiff if high order methods are stiff? [closed]

I'm trying to solve a an ODE system (1000 equations) on Matlab. I want to check the difference between the solution provided by the ODE45 solver of Matlab and an implementation of the same equations ...
1
vote
1answer
40 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
14 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
34 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 ...