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
186 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
42 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!
0
votes
1answer
78 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
188 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 ...
4
votes
0answers
117 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
120 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
112 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 ...
0
votes
1answer
25 views

MATLAB: How to make a list of words in matrices?

Cross-posted from stackoverflow, where there seemed to be no interest: http://stackoverflow.com/questions/22329233/matlab-how-make-a-list-of-words-in-matrices Given two n by n invertible matrices A ...
0
votes
1answer
188 views

Subtract matrices of different sizes

I have 2 matrices of different sizes, say A - 8*3 and B - 2*3. I need to subtract from each row of B, a particular row of A and sum these values. This I need to do for all the rows for A and store the ...
0
votes
1answer
85 views

Prove relative error with condition number of matrix inequality

I was working on some questions and solutions, and encountered the following question. I am able to prove the inequality using the given information and some algebraic manipulation but the "within ...
2
votes
2answers
116 views

Matlab terminate code if warning occurs [closed]

I am running a code where by I want to maximise a parameter (basically the range of integration) by increasing it in steps until a warning occurs. It involves inverting a linear system Ax=b and I want ...
0
votes
1answer
58 views

Matlab: plotting y against f(y) [closed]

I am learning about Matlab and autonomous differential equations and have been trying to plot the graph of y against $f(y)$ for the logistic equation but it doesn't seem to come out right. this is ...
0
votes
2answers
1k views

Solving system of equation with many variables and parameters

I wonder if there is any way how to made MATLAB solve the system of equation as this: $ s\cdot x_1 = \frac {R_1L_2}{M^2-L_1L_2} x_1+ \frac {MR_2}{M^2-L_1L_2} x_2+\frac {M}{M^2-L_1L_2} x_3 - \frac ...
3
votes
5answers
819 views

Round a set to the nearest values in another set (2D), faster algorithm with Matlab

Given a set of numbers, like A={{1,2.5,3}, {4.2,7,10}}; and another set of numbers, like B={1,2,3,4,5}; Is there a fast ...
0
votes
2answers
1k views

How to find (and plot) a probability distribution function?

I'm working on my biometrics course, and I have to plot a pdf (I think it means probability density / distribution function). Here is a sample pdf graph : Introduction to Biometrics page 5 , figure ...
2
votes
1answer
350 views

Matlab help related with discretization of second order elliptic partial differential equation

I am reading this paper. In Example 2 from this paper, linear system of equation $Ax = b$ is given, where coefficient matrix $A$ has been generated by he five-point discretization of the following ...
0
votes
1answer
312 views

Generating Different types of Matrices in Matlab

I am working on a project for a numerical methods class comparing two iterative methods for solving $Ax=b$, and I was wondering what type of functions Matlab has for generating arbitrarily large ...
0
votes
1answer
2k views

Getting wiener filter coefficients in Matlab

I need to find two coefficients (w1,w2) for a wiener predictor filter of the signal x(n)=0.65x(n-1)-0.7x(n-2)+v(n) where: ...
0
votes
2answers
425 views

Plot recursive signal in Matlab

I need to create and plot this signal in matlab with 2000 points: x(n) = 0.6530 x(n-1) - 0.7001 x(n-2) + v(n) Where $x(-1)=x(-2)=0$ and $v(n) =$ white noise I ...
0
votes
1answer
338 views

MATLAB determining elementary matrices for LU decomposition

I am confused by this question I am studying for MATLAB practice.
0
votes
1answer
372 views

Is my implementation of FastICA right?

I have written the following code to perform ICA on the mixed signals that were generated using a random mixing matrix. But the performance of the algorithm is not satisfactory. Did I do something ...
1
vote
1answer
79 views

Algorithms for non-random but equidistributed ways to fill up a Cartesian plane

In pages 90-91 of this book the authors talk about uniform, but not necessarily normally distributed random ways to fill up a Cartesian grid. For example, in the attached images. These are the ...
1
vote
1answer
969 views

Using Runge Kutta 2 on a System of Equations

So I created a MatLab code to solve an ODE equation, however I'm having a hard time vectorizing everything! Here is the code as I have it: ...
0
votes
2answers
771 views

Laplace equation in 1D with MATLAB - Neumann boundary condition

My previous problem is here and I 've done. Laplace equation in 1D with MATLAB I have the next problem: solve Laplace equation in $1$D with boundary condition $u'(0)=u'(1)=0$ Help me some hints. ...
0
votes
1answer
89 views

MATLAB Finding Difference of two equations

So I'm trying to figure out how to do a fairly simply mathematical task in MATLAB but I don't know what it is called so I don't know what to search. Basically what I want to do is if you have two ...
0
votes
1answer
894 views

Laplace equation in 1D with MATLAB - Dirichlet boundary condition

Here is a Matlab code to solve Laplace 's equation in 1D with Dirichlet's boundary condition u(0)=u(1)=0 using finite difference method ...
0
votes
1answer
1k views

PCA using SVD in Matlab, a few questions.

I have X = [25, 2000] i.e. 25 subjects and 2000 values (i.e. each subject has a spectrogram that is reduced to 2000 values). My goal is to reduce from 25 subjects to 1 or 2 "subjects" that best ...
1
vote
0answers
145 views

Solving a Large band system using Gauss-Seidel Iteration

Sorry for my english. I have to solve the following band system using Gauss-seidel iteration program in matlab. $$ \begin{array}{cccccc} 12x_1&-2x_2&+x_3&&&=&5\\ ...
0
votes
2answers
45 views

Ordinary differential equations with signed first derivative

Consider the following coupled set of ordinary diferential equations: \begin{align} (K_{pa}+K_r)y_1(t)-K_ry_2(t)+C_0\operatorname{sign}(\dot{y}_1(t))\lvert\dot{y}_1(t)\rvert^\alpha &= ...
0
votes
3answers
108 views

Matlab code has a systematic error

I have the following code to calculate the number of real eigenvectors of a normally distributed matrix: ...
0
votes
1answer
318 views

Gaussian distribution and its parameters

I need to learn more about Gaussian distribution and given a set of data, plot a Gaussian distribution of it. Using the following code sample, could you please tell me how I can plot a Gaussian ...
1
vote
1answer
263 views

Recursive function for $a^n$ in matlab

...
1
vote
3answers
72 views

How to write this efficiently in MATLAB?

I would like to re-write this efficiently in MATLAB. n=3; x=zeros(n); y=x; for 1=1:n x(:,i)=i; y(i,:)=i; end I tried to run it in MATLAB and get this output ...
0
votes
2answers
597 views

Generate a random integer between -2 and 1 inclusive

How can one generate a random integer between -2 and 1 inclusive? I know if I take rand*(b-a)+a I would get random real number between a and b Thanks
0
votes
1answer
188 views

Matlab - Generate square convex function with positive definite Hessian Matrix

So, I have to generate a square convex function in Matlab and it's Hessian Matrix must be positive definite but I can't find any function that can help me do that. Is there anything I should search ...
0
votes
1answer
135 views

Solving a nonlinear system of differential equations in MATLAB or Mathematica

Is it possible to solve the system $$\dot{W}=A\left(k-\frac{M}{W}\right)$$ $$\dot{M}=B\left(k-\frac{M}{W}\right)$$ with initial conditions $$W(0)=w_0$$ $$M(0)=m_0$$ in MATLAB or Mathematica? If so, ...
-1
votes
2answers
38 views

How to get an n+2 column in matlab

function dy = SIR(t,y) n=100; dy=zeros(n+2,1); ...
1
vote
3answers
5k views

How to plot a phase portrait for this system of differential equations?

I beg your help.. I'd like the phase portrait for this system. I don't know how to use Mathematica/Matlab ... :( If anyone can make this portrait and post a print screen here, I would thank you ...
0
votes
1answer
65 views

Matlab help with Newton's method

I'm doing something wrong. I don't know what. I get random numbers instead of anything that converges. So, this is supposed to converge to $\sqrt{x}$ ($\sqrt{3}$ here, which is approx. $1.732$). ...
0
votes
1answer
89 views

Help with Matlab rewriting subtraction as division

I have the function 1./(1-(x).^3)-1./(1+(x).^3) I need to rewrite this function so that it works well when I plot it on Matlab on the interval ...
0
votes
1answer
34 views

The entries of a random matrix

I am confused about something. Whenever I create an $n\times n$ random matrix using Matlab (using the command $A=\mathrm{rand}(n,n)$), I get a square matrix whose entries are all between $0$ and $1$. ...
3
votes
3answers
78 views

Changing [2,4] into [0,1,0,0,0,1] in Matlab

Good day, I apologize for the very vague title, I didn't really know how to formulate what I want. However, I can explain what I mean: I have a vector v1: ...
0
votes
1answer
29 views

How to get good derivatives results in matlab?

I got the set of some points, and I need to get derivatives from it. I try to use the diff() function in matlab but, well, results kinda not ok. Is there any better ...
-5
votes
1answer
69 views

Describe the Transpose of $A= \left[\matrix{0 & 0 & 1\\0 & 1 & 1\\ 1 &1 &1} \right]$

$$A= \left[\matrix{0& 0& 0& 0& 0& 0& 0& 0& 0& 1\\ 0& 0& 0& 0& 0& 0& 0& 0& 1& 1\\ 0& 0& 0& 0& 0& 0& ...
0
votes
1answer
42 views

MATLab help involving Linear Algebra.

I am trying to understand what is happening here.. A = floor(10*rand(3)); b = sum(A')'; z = ones(3,1); If I solve the system $Ax = b$, the solution is identical ...
1
vote
2answers
320 views

help on matlab code

I would like to display errors in case a user enters a number less or equal to 0.how can i put it? thanks Problem:Write a script areaMenu that will print a list consisting of “cylinder”, “circle”, ...
1
vote
0answers
173 views

Using Lambertw to solve $x\ln(x) = a$

I am trying to solve the equation $$ x \ln (x) = a, $$ where $x$ is a variable and $a$ is a given constant, using Matlab and the lambertw function. Not really sure exactly what to type into Matlab ...
2
votes
1answer
92 views

How to express MATLAB indexing in math notation?

I am currently writing a paper concerning discrete arrays. Given the following MATALB statement ...
0
votes
2answers
153 views

Can the singular values be plotted?

I have a set of 3 x 3 co-variance matrices that I need to plot. Using singular value decomposition (svd) in Matlab I managed to obtains a vector of singular values for each matrix as stated here. I ...
0
votes
1answer
2k views

Computing a double integral using MATLAB

I need to compute a double integral using MATLAB I'm not good at programming. I believe you just have to use this function called integral2 http://www.mathworks.com/help/matlab/ref/integral2.html But ...