# Questions tagged [matlab]

Questions about the numerical programming language MATLAB.

751 questions
Filter by
Sorted by
Tagged with
4answers
32k views

### How does the MATLAB backslash operator solve $Ax=b$ for square matrices?

I was comparing a few of my codes to "stock" MATLAB codes. I am surprised at the results. I ran a sample code (Sparse Matrix) ...
2answers
12k views

### why is A*v+B*v faster than (A+B)*v?

$A$ and $B$ are $n \times n$ matrices and $v$ is a vector with $n$ elements. $Av$ has $\approx 2n^2$ flops and $A+B$ has $n^2$ flops. Following this logic, $(A+B)v$ should be faster than $Av+Bv$. Yet,...
4answers
9k views

3answers
5k views

### MATLAB matrix multiplication (the best computational approach)

I have to make a coordinates transformation between two reference systems (axes). For that, three matrices ($3\times3$) have to be multiplied due to some intermediate axes being used. I have thought ...
6answers
1k 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 ...
1answer
16k 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 ...
4answers
16k views

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

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.
4answers
513 views

### Hosting site for a small scientific library

For my research work I have been developing a small C++ library aimed at facilitating the communication between C++ computational codes and Octave/Matlab (when the latter is used for post-processing ...
2answers
375 views

### Numerical stability of higher order Zernike polynomials

I'm trying to calculate higher order (e.g., m=0, n=46) Zernike moments for some image. However, I'm running into a problem ...
3answers
332 views

### Can my project survive without Object Orientation?

I am writing a small MATLAB package which will solve a certain class numerical problems. There are 3 stages of the algorithm and the user has 5 choices for each stage. I have implemented the entire ...
1answer
7k 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 ...
1answer
613 views

### Matrix Balancing Algorithm

I have been writing a control system toolbox from scratch and purely in Python3 (shameless plug : harold ). From my past research, I have always complaints about ...
4answers
5k views