MATLAB = MATrix LABoratory A scientific computing/programming software originally developed at the University of New Mexico and designed with particular emphasis on vector and matrix based operations.

learn more… | top users | synonyms

3
votes
2answers
85 views

What is the Complexity of MATLAB operations

I'm trying to analyze the complexity of MATLAB code I wrote. I'm trying to figure out how much (in terms of $O$ or $\Theta$) to give functions like find, matrix ...
4
votes
1answer
72 views

Integration of an indefinite integral: matlab precision problem

The integral I need to evaluate is: $$ \int_x^{\infty} \frac{t^n}{e^{t} -1} dt $$ After some research I found a paper saying, The numerical values of the two integrals [...] are easily ...
4
votes
1answer
46 views

Matlab help related with the scaled newton's iteration method

I apologize if this question doesn't fit for this site. I am new for this site. I need little help with matlab code for the method mentioned in this paper for computing the inverse of the matrix. In ...
2
votes
1answer
40 views

How to save a matlab source code into a string in matlab?

I want to save a matlab source code into a string format in matlab. Does anyone know how to do this? For example, type xxx.m can display the source code of xxx.m. ...
1
vote
1answer
71 views

How can I compute whether a sequence is an even or odd permutation of an increasing sequence? [closed]

Variants of this question have been crossposted to Stack Overflow and Mathematics Stack Exchange. Additional answers may be found at these other sites. Computational Science People: I originally ...
5
votes
1answer
158 views

Implementing Explicit formulation of 1D wave equation in Matlab

So the theory is straightforward. We have: $$\frac{\partial^2U}{\partial t^2}=c^2 \frac{\partial^2U}{\partial x^2}$$ discretizing it gives: $$\frac{U(i+1,j)- 2U(i,j) + U(i-1,j)}{(\Delta t)^2} = c^2 ...
1
vote
1answer
48 views

Discrete 3D convolution of matrix valued functions

As stated in the title, I need to make a discrete 3D convolution of two matrix-valued functions. Or, actually, I need to convolve a matrix-valued function with a vector-valued function. That is, I ...
1
vote
1answer
66 views

Solving a “generalized” linear programming problem

I need to solve the follwing constrained optimization problem. Is there any MATLAB toolbox which can solve this. minimize $A_1 x$ subject to $A_2 x = 0$ $A_1$ is an $m\times n$ matrix where $m ...
7
votes
2answers
141 views

Caching mechanism

I've been having problems designing an effective caching mechanism. The mechanism is to be used as part of a project developing scientific software. The goal is to save computation time by loading ...
1
vote
1answer
42 views

matlab set center of output figure to [0 0 0]

I have a few set of data of three dimensional matrices, n x 3 with x, y and z coordinates. I viewed the matrices in the figure window. ...
1
vote
0answers
74 views

Block Cyclic Reduction implementation help, matlab

I'm sorry if this question is too open ended, or not appropriate for the forum. If so I'll remove the post and see if I can refine my problem, but at the moment I'm totally stumped. I was hoping ...
2
votes
2answers
77 views

Matlab element within ranges and distance between two points

I have a 53534x3 matrix with x, y and z coordinates. I want to find the element of matrix within ranges as follows: ...
3
votes
1answer
59 views

How to do local FFT on huge 3D vector data cell mesh and visualize it spatially?

Simulation type: I'm running a simulation with the OOMMF micromagnetics package http://math.nist.gov/oommf/ where are magnet is represented by a mesh of 3 million cells, it gets excited by a ...
6
votes
1answer
129 views

How to approximate the condition number of a large matrix?

How do I approximate the condition number of a large matrix $G$, if $G$ is a combination of Fourier transforms $F$ (non-uniform or uniform), finite differences $R$, and diagonal matrices $S$? The ...
3
votes
2answers
138 views

Finding A and X such that AX = 0, X is positive non-zero, and A is sparse

I apologize if this is a naive question. I'm trying to create some boostrap data for a system of linear, ordinary differential equations at steady state. Since the equations represent the ...
0
votes
0answers
52 views

Sign or cardinality constraint when solving for sparse signal?

I'm currently learning about using linear and semi-definite programming to find sparse solutions to problems. In particular, finding sparse solutions where the sampling functions are sinusoidal ...
1
vote
2answers
69 views

Matlab : Is there a way to programatically safely halt code execution (like FORTRAN's stop)?

Like the title says, I want to be able to stop the code at a specific location and have it halt safely. I cannot find a command to do it like for example in FORTRAN there is the stop command.
1
vote
1answer
56 views

GMRES Matlab 'tol' parameter

I need to use GMRES solver in MATLAB, and I need to play around with the codes parameters and I had a very simple question about its usage. The documentation of the solver here mentions a parameter ...
1
vote
0answers
59 views

features recognition & reconstruction of 3d mesh delaunay matlab

I managed to display the coordinates of x,y and z into a 3D mesh by using delaunay function. The coordinates are in .obj format actually and i have read it into matrix form. Now, i would like to ...
0
votes
0answers
47 views

Issues with sequential feature selection

I am trying to do some feature selection in gene expression data with 22215 features. I followed the tutorial here. I initially applied filter method(ttest) to select the features having the best p ...
0
votes
0answers
14 views

How does the Trimulus sensitivity functions relate to the luminosity function?

In colorimetry, the irradiance spectrum is weighted with the luminosity function to obtain the perceived luminosity, and the tristimulus sensitivity functions to obtain the perceived ...
3
votes
1answer
166 views

in matlab, what differences are between linsolve and mldivide?

in matlab, both linsolve and mldivide are used for solving a system of linear equations, in all of determined, overdetermined and underdetermined cases. Reading their documents, I was wondering what ...
0
votes
0answers
16 views

Matlab SISOtool Plotter

Is anyone familiar with plotting in the Matlab SISOtool? For some reason, I cannot access the plot options to change the plot thickness. Specifically, I am trying to play around with the line ...
2
votes
1answer
27 views

Trying to implement a simple/efficient combinations function in MATLAB

So, recently, I have found myself in the position of having to implement a combinations function in MATLAB. What I mean by this is the following: I simply need to list all possible combinations for an ...
4
votes
2answers
101 views

Testing 1D Poisson Solver

I'm trying to test a simple 1D Poisson solver to show that a finite difference method converges with $\mathcal{O}(h^2)$ and that using a deferred correction for the input function yields a convergence ...
4
votes
1answer
93 views

Implementing the $\theta$-method for solving an IVP

I also posted this question on the Math SE site, but it was suggested I post here also. I want to implement the $\theta$-method to solve an IVP in MATLAB. The $\theta$-method is: $y_{j+1} = y_j + ...
0
votes
1answer
92 views

How easy is it to combine symbolic and numeric computation in Matlab?

CS Beta people: I have been doing some multiple integrals with a combination of symbolic and numerical integration (because symbolic answers have not always been possible). I have been using ...
1
vote
0answers
27 views

Left and right eigenspaces of product of grammians

I solve the Lyapunov equations : $$ A W_C E^T + E W_C A^T + B B^T = 0 $$ $$ A^T W_O E^T + E W_O A + C^T C = 0 $$ to obtain $ W_C $ and $W_O$. My aim is to get the left and right eigenspaces of $W_C ...
11
votes
1answer
200 views

can I trust this numerical triple integral from Matlab?

Computational Science people: I originally posted this question at Math Stack Exchange and someone commented that I might get "much better" answers here: I am a novice at numerical methods and ...
1
vote
0answers
69 views

setting a condition on MATLAB ode45 output

I want to solve a system of differential equations using ode45 , for (many) parameters in MATLAB to investigate the behavior of solutions with coefficients of the equation .I want to find the ...
6
votes
4answers
165 views

parameters estimation

I have to estimate a parameter (K), but I don't know how I can do it. I think by a regression model (minimum least square?), but I'm not sure. The system is: ...
2
votes
1answer
318 views

Finite Element Method: 2-D Poisson's Equation in Matlab, Gaussian quadrature

I'm having trouble understanding how to code 2-D Poisson's Equation with Dirichlet boundary conditions. What I have thus far is Constructed square mesh with triangular elements Assembled stiffness ...
1
vote
1answer
70 views

Order of MATLAB FFT frequencies

This wikibook states that the output of MATLAB's FFT corresponds with the wavenumbers ordered as: ...
1
vote
1answer
104 views

how to know cylinder volume in pixels?

I have a 3D point cloud representing ad object. I use a 3D cylinder to fit this object in the point cloud, so I check if each point is inside the cylinder and, if it is, then I assign a weight to that ...
4
votes
2answers
95 views

I'm having trouble debugging multigrid. What to do?

I've spent far too much time coding and debugging multigrid. While I clearly can't post all of my code as it would be silly to ask someone to go through all that code, is there anything I should pay ...
4
votes
3answers
92 views

PRIMA gives an unstable result?

I am working with Modified Nodal Admittance representation of circuits. I am doing Model Order Reduction using PRIMA on MATLAB. I am considering these circuits as Descriptor State-Space systems. I ...
4
votes
2answers
67 views

numerical investigation of stability of motion (confinement)

I am trying to find the required specifications of a RF trap, in which a proton can be confined.(trap dimensions,voltage frequency and amplitude used, etc). I have to solve the equations of motion ...
4
votes
3answers
356 views

Efficient assembly of finite element matrix in MATLAB

Question What is the most efficient algorithm for finding a row of a matrix which matches a given row? This is the same as a table lookup based on multiple criteria. Context Finite Element Matrices ...
4
votes
6answers
355 views

Soft Question: Where does Python fit into the picture?

So I've been debating whether or not I should bother learning Python. From speaking with my professors, Matlab seems to be the common language used in applied mathematics/computational science as far ...
14
votes
3answers
366 views

Method for numerical integration of difficult oscillatory integral

I need to numerically evaluate the integral below: $$\int_0^\infty \mathrm{sinc}'(xr) r \sqrt{E(r)} dr$$ where $E(r) = r^4 (\lambda\sqrt{\kappa^2+r^2})^{-\nu-5/2} ...
2
votes
1answer
60 views

Customizing Genetic Algorithm on Matlab

The Matlab version is 2012b. I am trying using the built-in GA functionality through the Optimization Tool GUI on Matlab. I want to use bit string chromosome with a given length (for example L=24) and ...
0
votes
1answer
117 views

software request for solving acoustic wave equation

I am searching some libraries or toolboxes (preferred MATLAB) for solving acoustic wave equation in heterogeneous media with time varying source term, i.e. $$\nabla^2 \psi(\vec{r},t) - ...
4
votes
2answers
152 views

How to code in Matlab: If an argument is empty, then default to “x” value?

I have a function with a number of arguments, but some of them are optional. 1.) If when the function is called, some are left empty, how do I code it so that it defaults to a specific value? 2.) ...
3
votes
2answers
87 views

Handling function inputs in Matlab

Say I have a function function u = somefxn(f,n) where f is some function, say ...
6
votes
1answer
111 views

Nonlinear dynamics: algorithm suggest

I've just started a thesis on nonlinear dynamics which entails numerical analysis of the Duffing oscillator (DO). It's basically just a second order ODE, or equivalently a set of ODEs. Say, after ...
2
votes
1answer
102 views

What is the runtime complexity of MATLAB operation A*B where A and B are general sparse matrices?

I tried to search the answer and I found that method cs_multiply from this book has been adopted for the purpose of multiplication of two general sparse matrices in MATLAB. In the book it says that ...
1
vote
1answer
74 views

Clustering data based on the radius of a sphere

I have a data-set that has four columns [X Y Z C]. I would like to find all the C values that are in a given sphere centered at [X, Y, Z] with a radius r. What is the best approach to address this ...
4
votes
1answer
128 views

Creating spheres In Matlab that change surface color depending data

I am trying to create a series of randomly distributed spheres in Matlab, three will be three sub-sets. I would like each subset to have a different color. I am using a structure because each sphere ...
3
votes
1answer
73 views

Simple substitutions using symbolic computing in MATLAB

Suppose I have the following MATLAB code. syms a b c1 c2 c1 = a + b + pi*b c2 = a + b + 0.5*b Then c1 gets evaluated to ...
3
votes
2answers
85 views

Are matlab C library versions backwards compatible?

I have some C++ code that links to matlab2008b. Are matlab 2012a and 2012b backwards compatible with 2008b? If it's not trivially compatible, are there some simple steps to make it compatible?

1 2