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

curve fitting in matlab

I have four curves for four different times as shown below in the figure. I need to draw the curve for time in between the given times e.g., I need to plot the curve for $t= 3$ and $t=10$ in matlab ...
3
votes
3answers
57 views

How can I write an SDE in Matlab?

My professor would like me to solve a system similar to the following: $$ dx_i=[f_i(x_1,x_2,...x_n)]dt + g_ix_idW_i$$ Where $g_i$ are positive constants that measure the amplitude of the random ...
1
vote
0answers
29 views

Which symbolic programming language for manipulation of nonlinear equations?

I have a set of (multivariate, nonlinear) equations which I want wo modify according to my own rules, i.e. not in a standard ways such as matlab's simplify function. I am looking for a mathematical ...
0
votes
1answer
30 views

Convergence of Secant method or IQI

We have drawn a graph that shows that the methods do converge but is it possible to obtain values for the rate of convergence of the secant and inverse quadratic interpolation methods for a particular ...
1
vote
0answers
33 views

Checking the output of 2nd order Gaussian convolution with a test image

I need to find out if the output from some matlab code is actually correct. It takes an input image and convolves it with Dxx, Dxy, and Dyy, which are the 2nd order derivatives of a Gaussian with ...
1
vote
1answer
20 views

Matlab create matrix without loops

I'm trying to create a Matrix in Matlab, which is dependent on 2 control variables $i$ and $n$. They are defined like this: $i=1:10$, $n=0:N-1$. Now I'm trying to define a matrix, where an entry is: ...
1
vote
1answer
57 views

Derivative of function using discrete fourier transform (MATLAB)

I'm trying to find the derivative of a function $f(t)$ using the discrete fourier transform. My end goal is to do so numerically, but I suppose if I have the theory down then the rest should follow ...
0
votes
1answer
38 views

Inverse Quadratic Interpolation and the secant method

I am currently completing a maths project that aims to approximate the roots of functions using MATLAB. The two root finding methods that I have used are inverse quadratic interpolation and the ...
0
votes
3answers
76 views

first, second and third derivative of a vector function

I can define the following vector function $f(x,y,z) = [x^2 - 1, x^3 + y^2, z]$ in MatLab or in Maple. I want to find (and evaluate) the first, second and third derivatives of it. How to find : ...
0
votes
1answer
27 views

Givens Making Diagonal Element Null Matlab

Given the following matrix: >> A = [3 3 0; 4 4 5; 0 0 1] A = 3 3 0 4 4 5 0 0 1 The rotation matrix would look ...
2
votes
1answer
40 views

How to draw stick trefoil knot

http://commons.wikimedia.org/wiki/File:Stick_number_trefoil.png I am interested in plotting the stick trefoil knot. I don't know where to start. I am looking for equations or co-ordinates of ...
0
votes
0answers
22 views

Using event function in matlab ode45 for multi-dimensional state vector

I have a set of odes written in matrix form as $X' = AX$; I also have a desired value of the states X_des. $X$ is a five dimensional vector. I want to stop the integration after all the states reach ...
1
vote
1answer
25 views

Two outputs in matlab function

I'm calling a function with 2 outputs: 2 vectors of different size. I need to use 2 vector of different size (outside of the function) that are calculate inside of the function. How can I use both ...
0
votes
1answer
14 views

Building a square matrix having in the j-th column specific data

Why if we want to build the square matrix $A$ having in the j-th column the ordinates $y_i^j$ in the y5 vector, we have to elevate every column as it follow: ...
1
vote
0answers
41 views

Using SVD in PCA for image compression

I found some help material and guided by it tried to implement PCA using SVD in MAtlab for image compression. I did it in this way: ...
1
vote
0answers
43 views

Secant method in Matlab

I have done following, but I don't know how to put that function into this: ...
0
votes
0answers
27 views

The function of fftn in Matlab

Suppose there is a 3 dimension matirx. ...
1
vote
2answers
77 views

Simulating Diffusion/Wiener Process with Random Walk

I hope this is the right section for this kind of questions. I am trying to simulate, with MATLAB, a diffusion model starting from a Random Walk. I am using a Random Walk with information increment ...
0
votes
1answer
37 views

Matlab upper and lower triangular matrix

I created an upper triangular matrix in U and a lower triangular matrix L from A matrix but when I go to make the inverse procedure in order to take my original matrix the matlab returns the right ...
0
votes
1answer
19 views

With rows have a -1 in its third column? (matlab)

Let me explain my question with an example. I have the matrix $\begin{pmatrix}0 &5 &1 \\ 0&5&-1 \\ 10&-55&2 \\ 4&0&-1 \\ 1&1&1 \\\end{pmatrix}$ and I need to ...
1
vote
1answer
21 views

Question about a matlab matrix

To explain my problem I goint to show a little example. I have a matrix K $K=\begin{pmatrix}k_{11}&k_{12}&k_{13}\\ k_{21}&k_{22}&k_{23}\\ ...
1
vote
2answers
35 views

Calculate maximal island of ones in a matrix

I have came up with a problem involving matlab and matrices with entries 1 or zero. The matrix represents people in a footballstadium, doing a wave. If a person does the wave, he has a one in the ...
0
votes
1answer
27 views

Basis of a matrix with zero rows

I'm trying to check whether B is a basis for $\mathbb{R}^m$. If B is not a basis, I want to use the matrix eye(m) from matlab to create a basis for $\mathbb{R}^m$ that will contain all vectors from B ...
0
votes
0answers
15 views

Matlab Comparison Operators

I am trying to print the symbol '≈' in a figure in matlab but instead of that matlab print '->' why does this happen?
1
vote
1answer
57 views

Good software package to help Maths learning

I'm a mature student enrolling at a Maths degree course soon at the university. I'd like to be able to use some software package to help me visualize equations, graphs, play around with variables with ...
1
vote
1answer
44 views

Distribution of a sample generated from an AR(2) model

Consider the autoregressive model of order 2 $$X_{t}=\varphi_1X_{t-1}+\varphi_2X_{t-2}+\varepsilon_t,$$ where $\varepsilon_t$ are zero-mean normally distributed random variables with $\sigma^2$ ...
1
vote
1answer
74 views

Matlab ode45 numerical solution

I'm trying to solve a 2nd order differential equation, using the Runga Kutta's ode45 function in Matlab. It's for a bachelor project, where I'm trying to simulate the behavior of a spherical robot, ...
1
vote
1answer
38 views

How to draw a circular 3D plot in matlab

I want to plot this function in matlab : sin(4*x)*cos(4*y) on a disk This is how i proceeded : syms x y; f=@(x,y) sin(4*x)*cos(4*y); ezmesh(f,'circ') This method works with f=@(x,y) ...
0
votes
1answer
25 views

Function Plotting in Matlab

I m new to Matlab and I need it for my senior seminar project. How would I plot a function of the form $x_{i+1}=f(x_i), \;f(x)=rx(1-x)$, for x=linspace(0,1) and some $\;r$? I m supposed to plot x as a ...
-1
votes
0answers
55 views

Plot matrix using matlab

I got a matlab script as below: ...
2
votes
1answer
33 views

Similarity between two curves

I am trying to find out how well a deterministic version of a MATLAB program predicts the stochastic version. I don't know what statistical test/quantitative analysis to use. This is what the output ...
0
votes
1answer
134 views

Givens method for sparse matrix

I have to solve a linear equation system, Ax=b, where A is a (very) large sparse matrix (compressed sparse column form). From what I've read I think I'm supposed to use Givens method, but I don't ...
1
vote
1answer
82 views

Markov chain problem, Help!

I am stuck on this question for a long time Question: Consider 4 balls, labelled from 1 to 4 and distributed amongst two urns (Urn 1 and Urn 2). At each time $n>1$, a number from 1 to 4 is chosen ...
0
votes
2answers
26 views

Minimization Problem in Matlab regarding vector equation

How can I minimize for b in the equation f(b) = norm((b*a+c),2) when b is a scalar and c, a are vectors (Nx1)? I tried: ...
0
votes
1answer
157 views

Matlab code for logistic map bifurcation

Take the logistic map $$x(i+1) = f(xi), f(x) = rx(1 − x)$$ Find numerically the $r$ values for the first two bifurcations. I know I have to set $f(x)=0$, solve for $x$, and then use the $x$ values ...
0
votes
1answer
22 views

Can I use fft of Matlab in this case?

fft is a function for Fast Fourier transform. In Matlab help document, Y=fft(x), $\rightarrow$ $X(k)=\sum\limits_{j=1}^Nx(j)w_N^{(j-1)(k-1)}$ where $w_N=e^{(-2\pi i/N)}$ and $N$ is the length of $x$. ...
0
votes
0answers
37 views

Canonical Correlation Analysis (CCA) by SVD

We all know that CCA correlation vectors can be computed by eigen-decomposition (using function eig() in MATLAB) as shown here. For example: eig($C_{xx}^{-1}C_{xy}C_{yy}^{-1}C_{yx}$) (1) Recently I ...
0
votes
0answers
15 views

Computing an element of Moore-Penrose pseudoinverse of a large sparse matrix

I am computing resistance between two points in a network. To do this I compute the Laplace matrix and then take a Moore-Penrose pseudoinverse. However, I am really only interested in the resistance ...
0
votes
1answer
24 views

derivative of the exponential integral

I have one function that is defined: $$E_x(f)=\int K_\sigma(y-x) \cdot e^{-a\cdot f(y)} \, dy$$ where $y$ is neighboor points of $x$; $f(y)$ is a function of $y$; and $a$ is constant. I want to ...
0
votes
1answer
30 views

Logistic Equation with MatLab

I want to write a MatLab file that can solve the following logistic equation: $$\frac{dN(t)}{dt} = [a-bN(t)]N(t) \;\;\;\; a>0, b>0$$ But I'm not sure how to go about it. Are there any examples ...
0
votes
0answers
31 views

A numerical inverse Fourier transform

I am doing an research in phase noise, And I'm troubled in a paper. In that paper,it says when perform a inverse Fourier transform on ...
1
vote
1answer
62 views

Affine Transformation matrix for mapping a triangle to another

I'm trying to write a function in Matlab that will give me a matrix T that can be used to multiply points in homogeneous coordinates. This is achieved my mapping a ...
0
votes
1answer
25 views

Generate matrix of random number with constraints

I want to generate a matrix of random numbers (normrnd with mean == 0) that satisfy the following constraints using MATLAB (or ...
0
votes
1answer
36 views

About a matlab mathematic problem from applied numerical method

Can you help me,please to solve this problem with the help of Matlab. Thanks!
-1
votes
0answers
24 views

Matlab Creating function for ode45

i want to create odefun from reading data from the table ...
0
votes
1answer
24 views

Constructing a similarity matrix between points

I have two images with two sets of corresponding points. In order to align the images I'm trying to compute the similarity matrix that describes the relationship between the corresponding points. I ...
0
votes
1answer
79 views

Obtaining useful information from graph obtained via Monte-Carlo Simulations

I've been running Monte Carlo Simulations on some Matlab code and then plot the graph shown below. I was just wondering what useful information I could collect from this graph? Edit: fit ...
2
votes
0answers
27 views

Matlab's dwt2 in publication quality notation?

I used Matlab's dwt2in my algorithm, what notation have you folks seen that describes the 4 resulting wavelets? How do I express ...
0
votes
1answer
23 views

MatLab: estimate number of iterations

I want automatically estimate iterations number in matlab. Suppose we have for(int i = 1; i < N; i++). It's clear that for-loop prodices ...
1
vote
0answers
32 views

using lsqcurvefit to fit piece-wise linear

I would like to use this function to fit piece-wise linearly to a set of data. Namely, I want to fit them with several linear segments. Including other requirements, I would not want the segments ...