Beantwortet
Want to add two 2D array with special condition
Easy peasy. A = [0 0 1;1 2 3; 0 0 0 ]; B = [1 2 1; 1 0 0; 2, 3, 0]; C = (A + B)./(1 + (A&B)) The trick is to look carefully ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
slope of non linear
Are you right to use a second order difference? NO. That is not the slope, but something proportional to the SECOND derivative. ...

fast 4 Jahre vor | 0

Beantwortet
Will Spanish be supported at some point in Matlab Text Analytics Toolbox?
That is a definite maybe. Or maybe not. Answers is not a direct line to the MathWorks. Those who answer a question here are doi...

fast 4 Jahre vor | 0

Beantwortet
Plotting a system of nonlinear equations
Learn first that MATLAB uses log(x) as the NATURAL log, NOT ln(x). As well, learn that MATLAB does NOT use implicit multiplicat...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to find the integer values of the following system of equations
These are called Diophantine equations, as integer solutions are required. The square terms and products make them nonlinear. As...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Finding an initial feasible point x0 for fmincon
Two simple rules apply. If it was easy, then all solvers would do it for you, automatically. There would never be any issues. N...

fast 4 Jahre vor | 2

Beantwortet
I have a very simple markov chain and I was wondering if there is a simplified equation for times spend in each state
This is not even a question about MATLAB. And worse, this is very likely a homework problem. However, since you have gotten an a...

fast 4 Jahre vor | 2

| akzeptiert

Beantwortet
Failed to add constant in the middle of a long array
I'm sorry, but you are simply wrong. It may mean that you did some other computations, or that you are confused. But this is a b...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
fminunc Converging at a strange point
This is a common mistake made by people. x varies over a moderately large range. That means the POWERS of x will get very large....

fast 4 Jahre vor | 0

Beantwortet
Aligning two noisy signals
Smoothing is NOT necessary. Lacking your data to use as an example... t = 0:500; S1 = sin(t/10) + randn(size(t))/10; S2 = cos...

fast 4 Jahre vor | 0

Beantwortet
Verify analytical expression: derivative of an integral with undefined function
You define a function of a variable as I do here: syms n omega phi(t) T diff(int(phi*exp(-i*n*omega*t),[0,T]),T) Looks like y...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Three terms exponential fit without initial guess
There are a lot of misconceptions here. Can you do a fit without ANY initial guesses? No. Any nonlinear fit will use initial gu...

fast 4 Jahre vor | 2

| akzeptiert

Beantwortet
Bound 3D function with asymptote
Your problem is that zlim ONLY limits the plot axes. It does not impact the shape of the surface itself. Instead, define the sur...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Fitting a sine to data
Are you doing something fundamentally wrong? Sort of, yes. Fitting periodic functions has a probem, in that you will need to pr...

fast 4 Jahre vor | 1

Beantwortet
How can I avoid pseudo random and confirm natural random ?
It is not possible to do that. For example, suppose I give you a number, but I won't tell you where it came from, or how I gener...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
24 Hours for run my for loop
The crystal ball is soooo foggy today. I just cannot look into your computer to know why your code is slow. All the darned thing...

fast 4 Jahre vor | 1

Beantwortet
Find equally (almost equal) distanced elements in an array
As a subtly different answer, now that I understand your question a little better, consider this idea. My goal in this answer wi...

fast 4 Jahre vor | 1

Beantwortet
Find equally (almost equal) distanced elements in an array
You don't really say enough about your question to make it easy to solve. How long will these vectors be? How many non-zeros? Do...

fast 4 Jahre vor | 1

Beantwortet
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...

fast 4 Jahre vor | 1

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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 ...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 1

Beantwortet
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...

fast 4 Jahre vor | 1

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
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(...

fast 4 Jahre vor | 1

Mehr laden