Answered
How to calculate the mean of all neighbouring elements in a matrix
This is actually trivially easy to solve, using a nice trick that is well worth remembering. (Note that this is a great trick th...

4 years ago | 1

Answered
Retreive standard deviation from noise
If it is purely white noise stored in the vector, then just use std. Even if the noise is not gaussian, std will still apply. S...

4 years ago | 0

Answered
Exponential curve fitting with nonlinearleastsquares methood
You DID get an exponential fit. However, your data is relatively noisy. And it does not span a wide enough interval so that the ...

4 years ago | 0

Answered
How to call a function over a rolling window of data?
Yes, there are more sophisticated ways to do this. But for gods sake, why not just write a loop? You don't say what size the re...

4 years ago | 1

| accepted

Answered
Different commands to do spline interpolation, are they the same?
Can two different functions exist that happen to do the same thing? Of course. MATLAB is a complicated language, that was create...

4 years ago | 1

Answered
Increasing number of data points by linear interpolation method
The problem is, as voiced by others, is it depends on why you are doing this. Certainly you can use interpolation tools to perfo...

4 years ago | 1

Answered
Converting a list of binary numbers to a decimal numbers
You have a list of binary numbers, as a character array. So zeros, ones, and a decimal point. (Personally, I think that should b...

4 years ago | 0

Answered
Why is lscov giving me a very different solution to a simple system with an analytical solution?
This is not the fault of lscov. As you have written it, t_matrix is quite well conditioned. There is only one solution to the pr...

4 years ago | 0

Answered
Curve fitting tool does not respect the upper and lower limits of parameters of custom equation
Sorry, but the confidence limits are not impacted by the bounds. To get better confidence limits they would need to do considera...

4 years ago | 0

| accepted

Answered
A compact way to find single digit numbers (i.e. numbers between 0 and 9) and replace them with two digit numbers
In MATLAB, you CANNOT store a number in a numeric format as one that has a leading zero. If you want to convert the numbers to ...

4 years ago | 0

| accepted

Answered
How to calculate the rotation of this egg?
Find a bounding box, where the box can be rotated, not a box that is aligned with the axes. Find the orientation (angle of incl...

4 years ago | 0

| accepted

Answered
How can I find negative factorial ? (-0.5)!
Simple. Yes, you could use MATLAB, IF you knew that the extension of the function factorial(n) onto the real line is just gamma(...

4 years ago | 1

Answered
Out of memory error
You have 20000 variables. So fmincon will be computing a Hessian matrix internally of size 20000*20000 = 4e8. But that matrix is...

4 years ago | 3

| accepted

Answered
Why does smoothdata give bad results at the beginning and end of a dataset?
Think about it. This is really classic behavior, completely expected. Imagine the smoothing routine as a mathematical implementa...

4 years ago | 4

| accepted

Answered
Value of infinite integral is different
First, What is the correct value of this integral? syms k K = (k.^3).*(1+(2.35.*(k).^(2/3))) Just looking at it, I see a func...

4 years ago | 1

Answered
How can I get the symbolic steady state vector of a Markov Chain?
Easy, peasy. For example, given a simple Markov process, described by the 3x3 transition matrix T. T = [.5 .2 .3;.1 .4 .5;.1 .1...

4 years ago | 2

Answered
How to extrapolate given data to find more number of points?
Your words ask how to do interpolation. However, then you ask about extrapolation. The two problems are VERY different. To quo...

4 years ago | 0

Answered
Array indices must be positive integers or logical values?
MATLAB does not allow an index of 0. The FIRST element of an array or vector is indexed as x(1). In your loop, what was the ran...

4 years ago | 0

Answered
MAXIMUM MATRIKS IN MATLAB
Since you did not say which one to leave non-zero, I'll asssume that all values equal to the maximum are retained. A = randi(20...

4 years ago | 0

| accepted

Answered
Backslash does not provided the solution with the smallest 2-norm
It seems the gist of your question comes down to the idea that for a wide matrix, MATLAB should (in your eyes only) always produ...

4 years ago | 0

Answered
Solving Trigonometric Equations with More Than One Variables
You need to understand that first, the use of solve like this will probably fail. You have 4 equations, but only 3 unknowns. Sol...

4 years ago | 0

| accepted

Answered
I need an expression between two symbols R and a connected within a large order determinant.
Sorry, but not going to happen. Ever. Why not? There are multiple reasons why this will fail, so you are tilting at impossibly h...

4 years ago | 0

Answered
Function, dot, help me for solution
Your problem has NOTHING to do with dots. This is a common mistake we see made here. Suppose you have a pair of function handle...

4 years ago | 1

Answered
Equation to Matlab code
(I really hope I am not doing your homework here, but the question is not posed as if it is, even though I assume you are a stud...

4 years ago | 0

| accepted

Answered
How to get elapsed time of a code in matlab ?
Sorry, but no. A prediction of the time required for some arbitrary piece of code will never happen. It cannot happen. Well, no...

4 years ago | 2

Answered
Optimization of points generating inside a sphere
The common scheme that is advised is to generate points randomly, then if a point is too close to a neighbor, then you reject it...

4 years ago | 0

Answered
why covariance matrix Should be positive and symmetric in mahalanobis distance
SIGH. Multiplying a covariance matrix by its transpose is NOT what you want to do! If it is already a covariance matrix, that op...

4 years ago | 0

Answered
How do we interpolate a data set with noise?
Um, you generally don't want to interpolate noisy data! That is just a good way to amplify the noise. I did show many years ago,...

4 years ago | 0

| accepted

Answered
n as the natural numbers
There are many ways to interpret this question. If the goal is simply to TEST to see if n is a natural number, then you might do...

4 years ago | 1

Answered
how to use surf function?
Almost always, when someone says they have a single vector of z values and they want to use surf, they mean that they have a lis...

4 years ago | 1

Load more