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
0answers
56 views

How to solve this complicated differential equation?

I need to know how to solve this complicated differential equation in $z$ either analytically or numerically : \begin{eqnarray} \frac{dx_1}{dz} &=& -ib_1x_1 - ikx_2 \\ \frac{dx_2}{dz} ...
0
votes
1answer
51 views

How to solve these two differential equation?

I try to solve these two difference equation ; $$ \frac{dq}{dz} = -j\left(b_1q - kp\right),\\ \frac{dp}{dz} = -j\left(b_2p - kq\right) $$ where $j$ stands for $\sqrt{-1}$, and $b_1$ ,$b_2$ and k are ...
3
votes
7answers
172 views

Best Math Plotting Software for Electrical Engineering

I am an electrical engineering undergrad. I would like to learn a math plotting software which would be helpful in visualizing topics in advanced calculus (my immediate need). It would also be helpful ...
1
vote
0answers
15 views

what does autocorrelation matrix signifies in image processing?

I am trying to find out corners using auto correlation matrix in an image,what does it signifies?
2
votes
0answers
17 views

what is the significance of Eigen values of autocorrelation matrix?

I am trying to find auto correlation matrix of an image to get Harris corners.Paper I am referring suggest that if eigen values of auto correlation matrix are large the point will be corner point.so ...
0
votes
0answers
16 views

How I can write ssdata from Matlab to txt-file?

I have ssdata. It it shows like this: It is get from simulink using linear analysis tool. Now I must write it to txt file and I must also write names of columns and rows with data. I know that I ...
0
votes
1answer
30 views

How to add standard deviation regarding MATLAB function normrnd(mu,sigma)?

My question depend on this scenario which is as follows, I used a MATLAB function "normrnd(mu,sigma)" with mean 'mu = 0' and S.D 'sigma = 5', to generate a normal random number "R1". I added this ...
0
votes
0answers
33 views

Solving solely continuous system of ode's with matlab

I'm working with the numerical integration of the system of differential equations, $\dot{x}=f(x)$ with the vectorfield, $f(x)$ being solely continuous. Examples of the systems which I'm working on ...
0
votes
0answers
12 views

factor analysis for given data

suppose that we have following data i have done covariance matrix and eigenvalue decomposition ...
1
vote
0answers
20 views

Matlab Optimization problem with Matrices

I'm trying to solve an optimization problem in Matlab. The equations you will find below. Problem is it is all Matrices, and I have no idea which solver to use for that. w is of size (n x 1) mu_BL (1 ...
2
votes
1answer
37 views

Using Monte Carlo, estimate the value of $$\int_0^1\int_0^1e^{xy} \ dx \ dy.$$

Using Monte Carlo, estimate the value of $$\int_0^1\int_0^1e^{xy} \ dx \ dy.$$ I am using matlab to solve this problem. My code is the following: A = 1; N = 100000; s = 0; for i = 1:N; x = ...
3
votes
0answers
35 views

How can I find a tranformation matrix/Mathematical relation between two 5th degree polynomial curves in space?

I have the equation of two 5th degree polynomials which they don`t intersect with each other .Each curve is made of 100 points and these two curves looks similar but there are small differences .I am ...
0
votes
2answers
17 views

plotting two graphs in matlab

it's been 5 hours and I'm trying to plot two graphs in matlab but in vain, here is my code ...
2
votes
1answer
33 views

Probability of seeing subsequence in DNA sequence [closed]

I need help developing pseudo-code for a function that computes the probability of seeing a certain sequence of bases in amongst a super-sequence of DNA. The inputs to the function are : ...
0
votes
0answers
33 views

normalize function -inf to inf to integrate to one.

I have a function of the probability distribution (method of k nearest neighbor). How I normalize this function , that the area under the graph is equal to unity. I mean it will make the prob from ...
0
votes
2answers
22 views

calculate principal components

suppose that we have following data ...
0
votes
0answers
39 views

Finding minimum of a distance function using matlab

I have a function for that I want to find the minimum. The function calculates the distance between two sets where a set is defined as matix of row vectors $ D = [ d_1, d_2, ..., d_n]$, $d_n$ is a $m ...
0
votes
1answer
105 views

Newton-Raphson Method for Non-linear System of 3 variables in Matlab

I am trying to solve 3 non-linear system of 3 variables using the newton-raphson method in matlab. Here are the 3 non-linear equations: \begin{equation} c[\alpha I+ k_f+k_d+k_ns+k_p(1-q)]-I \alpha =0 ...
0
votes
0answers
11 views

Multivariate Multiple Regression with Repeated Measures

I have a dataset with p predictors for i items (so multiple regression). For each of s subjects, I have r repeated observations of v dependent variables (so it's a multivariate problem). I wish to ...
0
votes
0answers
18 views

Transform and numerically solve an ODE with heaviside of form $F'(z) = g(F(z)) + d + c \mathbf{H}(\bar{z} - z)$

I have an ODE in $F(z)$ (really a system of equations, but assume the vastly simplified form here) $$ F'(z) = g(F(z)) + d + c \mathbf{H}(\bar{z} - z) $$ Where $g(\cdot)$ is some non-linear operator ...
0
votes
0answers
13 views

Eigenvalues and fft of sound trying to find similarities

I'm looking at sound resonance patterns using matlab/octave to see if there may be patterns between FFT and Eigenvalues. I can get the frequencies and each of the frequencies amplitude to recreate ...
-1
votes
0answers
31 views

Matlab Question for Poisson Point Process (PPP) process

I am creating a PPP distributed users and vendors. First, I generated the users and then vendors. After that I calculate the distance of the user to each vendor. Then user chooses the closest one no ...
-1
votes
1answer
30 views

Multiple echo FIR Filter in Matlab

This is my final homework for the semester, I would be glad if you can help me.
0
votes
1answer
24 views

Evaluating double integrals using monte carlo methods in matlab.

I used the monte carlo method to integrate $\int_{0}^{1}x^2dx$ in matlab. My matlab code was simply the following: A=1; N=10000; s=0; for i=1:N x=rand; y=rand; if y<= x^2; ...
0
votes
0answers
22 views

steps in factor analysis in matlab

i know basically how to express PCA mathematicaly,but i would like to know steps that should be used for factor analysis,let us consider some matrix,for instance ...
1
vote
1answer
28 views

Determine frequency response from impulse response

I'm studying signal processing, using MATLAB to plot filter responses. So far, I understand I can use the impulse response to apply a filter to a signal. For example, the impulse response of an ...
0
votes
0answers
26 views

I was wondering if there was a way to plot a vector field and a 3d surface in the same window

I want to plot the vector field $$\textbf{F}(x, y, z) = \sin(xyz)\textbf{ i }+ x^2y\textbf{ j }+ z^2e^{x/5}\textbf{ k }$$ And the surface (part of elliptic cylinder) $$\textbf{r}(u, v) = u\textbf{ i ...
0
votes
1answer
30 views

Function with 2 outputs

I have written the following code: function [ z,a ] = complx( numb ) z=abs(numb); a=angle(numb); end but I get back just z and not a
0
votes
0answers
21 views

enforcing big M constraints in quadprog

I have a QP with LC type problem. I have several sets of variables x1, x2 ... ,y where x is continuous and y is binary. However I don't enforce this, it is simply bound 0 <= y <= 1 Now I use big ...
-2
votes
1answer
48 views

Matlab optimization toolbox vs. CVX solver?

I would like to know what is the difference between the Matlab optimization toolbox and CVX solver which is a convex optimization toolbox? Can a convex optimization be solved in both?
1
vote
1answer
26 views

Simpson's composite rule rate of convergence.

Hello I have wriiten a program in Matlab that determines an Integral using Simpsons rule and it also determines the rate of convergence. I tried my program on the following examples: $f(x)=\sin{ x}$ ...
1
vote
0answers
36 views

Bode plot of an unstable system?

I am a bit confused on how to sketch a bode plot for an unstable system? (being a/all pole(s) lies on RHP). I tried plotting it in matlab, but it doesn't resemble the output i was expecting using ...
0
votes
1answer
72 views

MATLAB: Plotting the inverse Fourier transform of a rectangular pulse.

I'm trying to repeat the results in the image below without using the rectangularPulse(a,b,z) function: Here is my unsuccessful attempt: Here is the code I used to create the first image: ...
1
vote
1answer
58 views

Cyclotomic Cosets and Minimal Polynomial for 45

Currently I am working on matlab in order to find Cyclotomic Cosets for 45. As 45 in not in the format of 2^m-1, matlab give me an error. I am trying to write algorithm in matlab/octave for my ...
7
votes
1answer
112 views

Fast algorithm for approximating Eigenvalue distribution of large sparse matrix

I am interested in the eigenvalue distribution of a huge $2^{16}$x$2^{16}$ Hermitian sparse matrix with spectrum contained in $[-1,1]$. That is I don't need to know all eigenvalues exactly, but rather ...
1
vote
1answer
114 views

arc length parameterization of planar curve in Matlab

Let $\gamma (t)$ be a planar curve parameterized by time $t$. For fun, let it be a limacon. In Matlab $\gamma (t)$ looks like this. ...
0
votes
2answers
29 views

Numerical precision of product of probabilities (normal CDF)

I'm trying to calculate $\prod_k{p_k}$ where $p_k$ are (potentially) very high probabilities of independent, zero-mean, standard normal random variables and $k>100$. However, I'm running into ...
1
vote
1answer
107 views

Solving Differential Equations theoretically and using matlab

i am trying to solve the initial value and elliptic boundary value problems below. but now i need some help solving them using matlab. for the elliptic problem, any method is ok, but for the initial ...
0
votes
1answer
38 views

Find the sparse representation in matlab

I have a dictionary(Matrix) D and an input(Vector) Y. Now I want to solve this problem: What is the Sparse Representation of input Y according to dictionary D. this problem is an important question ...
1
vote
3answers
48 views

Using loop to approximate pi (Monte Carlo, MATLAB)

I've written the following code, based on a for loop to approximate the number pi using the Monte-Carlo-method for 100, 1000, 10000 and 100000 random points. ...
0
votes
1answer
42 views

Plot as you go in MATLAB

I'm self studying some numerical analysis and I'd like to get a feel for how an ODE solver speed varies as you move forward in time. Is it possible to use matlab to numerically solve an equation ...
0
votes
2answers
43 views

Solving 2nd degree ODE with Euler method in MATLAB

I am trying to solve the equation below; $$\ddot{x}= -x + sin(t)$$ by the initial conditions; $$x(0) = 0 \\ \dot{x}(0)= 0$$ my MATLAB code is as follows: ...
1
vote
0answers
35 views

Calculating MSE for two different size matrixes

I have two $2$-column matrixes, one of the has $467$ rows while the other one has $61468$ rows. Both them are trajectory paths of same robot, the big matrix is kind of raw data and the smaller one is ...
1
vote
2answers
32 views

trigonometric interpolation of a sampled signal

Given N sampled points, using the FFT we can get the Fourier transform of those N points $X_k$. With N/2 the Nyquist frequency and $X_0$ the DC value. Using the inverse we can then get back the ...
0
votes
0answers
19 views

trigonometric polynomial using FFT

I am trying to use the FFT to approximate a given function. So i have 10 points xk that are given for example, if i use the FFT that will give me Xk. So now using the inverse FFT we can get the ...
1
vote
3answers
82 views

Calculating own dft via matlab?

We are asked to code our own dft function from the formula : If everything is done correctly it should give the same result with matlab's own dft function, in the end I'm comparing them but they ...
2
votes
0answers
31 views

Error on integration

I'm trying to compute and plot the following integral: $$\int_0^\pi d\theta \int_0^{2\pi} \left( {\cos\theta \sin\theta(x-\sin\theta \cos\phi)\over (1+x^2-2x\sin\theta ...
1
vote
0answers
39 views

Numerical solution of non-linear differential equation with MATLAB

I need some information to know if I can solve a nonlinear integral equation with terms $ u_{x} $ , $ u_{x}.u_{y} $ , $ u_{xx} $ , $ u_{xy} $ $u_{yy} $ $ u_{x}^{2} $ $ u_{y} ^{2} $ By numerical ...
1
vote
1answer
35 views

Matlab function to calculate

How can I input the two functions from this task in matlab ? A voltage peak in a circuit is caused by a current through a resistor. The energy E which is dissipated by the resistor is: ...
1
vote
2answers
36 views

Could anyone explain how is this Matlab code for log likelihood of Gaussian distribution implemented?

I was implementing Expectation-maximization algorithm for gaussian mixture module. However I realized my implementation has very bad accuracy. Then I found some code on internet. It seems this ...