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

Tanh function representation for conditional function

I have a condtion as $$T(x)= \begin{cases} -1 & \text{if }x <a \\ 0 & \text{if }a\le x \le b \\ 1 & \text{if }x >b \end{cases} $$ I want to approximate the above condition as ...
2
votes
1answer
51 views

How to represent the condition by mathematical

I have a condtion as $$T(x)= \begin{cases} -1 & \text{if }x <a \\ 0 & \text{if }a\le x \le b \\ 1 & \text{if }x >b \end{cases} $$ I want to represent the above condition as one ...
2
votes
1answer
121 views

Collinear points in 3dimension

Given three $3D$ points: $A,B$ and $C$, what is the procedure to check if they are collinear? In general, given $n$ points in $m$-dimension, how should one find out, if these $n$-points defines a ...
1
vote
1answer
45 views

Max command MATLAB

My friends and I have been trying to resolve a localized problem in MATLAB code - It deals with the "max" command - we are trying to find the maximum of R01 and R02, and plot this max against ...
1
vote
1answer
32 views

clustering of singular values

let us consider following graph of singular values i want to make some kind of clustering of these data,namely to seperate main components from non main components,let say signal components ...
1
vote
1answer
156 views

How to draw contour lines (projections) on axis x or y with octave?

With the builtin function contour(x,y,z) of octave one can draw level curves where z remains constant. My question is how to draw contour lines on axis x or axis ...
1
vote
0answers
25 views

recovering of time series in SSA

i am trying to reconstruct time series from SSA ,because according to this link http://en.wikipedia.org/wiki/Singular_spectrum_analysis there is procedure ...
0
votes
1answer
84 views

nonlinear least square

After some reading of Numerical Optimization, I am looking for some practice. Is there any practical resources of these problems. I mean with specific MATLAB code I've been looking but so far there ...
0
votes
1answer
227 views

Matlab Index out of bounds

I'm trying to call a function using ode45 from another script file and I am passing in an matrix A. Matlab throws an error and ...
0
votes
1answer
52 views

How can I solve an ODE when $F(x_0)=F'(x_0)=0$ is given at an unknown point $x=x_0$ using bvp5c?

I'm attempting to solve the following ODE using MATLAB bvp5c. I've used bvp5c for other typical multipoint boundary value problems but I have no idea how to deal with ODEs with conditions given at an ...
0
votes
1answer
252 views

Autocorrelation and spectral density in MATLAB

This question is threefold. We have an LTI system that is a first degree Butterworth LP filter with the power TF where fu = 110Hz and ...
0
votes
1answer
607 views

Autocorrelation and spectral density in MATLAB

This question is twofold. We have an LTI system that is a first degree Butterworth LP filter with the power TF where fu = 110Hz and ...
0
votes
0answers
38 views

Phase vocoder equation

I know I can adjust the frequency of a waveform using a modified version of the sine wave equation $$\mathrm{amplitude}\times\cos(2\pi\times\mathrm{frequency}\times\mathrm{time}+\mathrm{phase})$$ ...
0
votes
0answers
100 views

Transform one curve into another

I have been working on something for a while now, and I can't really get my head around it. I consider two curves with data points and want to determine the most optimal transform from one to another. ...
2
votes
0answers
77 views

(newbie) spectral derivative

I have data that form a scalar field on a 2D grid, evenly spaced. The grid has a finite size. There is no particular periodicity patern in my data. I want to calculate the value of the gradient at ...
0
votes
1answer
67 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
289 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
110 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
141 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
267 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
65 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
2k 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
303 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
721 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
40 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
169 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 ...
1
vote
1answer
43 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
15 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
357 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
3k views

Secant method in Matlab

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

The function of fftn in Matlab

Suppose there is a 3 dimension matirx. ...
1
vote
2answers
692 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
2answers
355 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
29 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
35 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
136 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
37 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 ...
1
vote
1answer
133 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
111 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
285 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
617 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
58 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 ...
2
votes
1answer
69 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
161 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
126 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
43 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
947 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
35 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
1answer
32 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
77 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 ...