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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 2

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

casi 4 años hace | 2

| aceptada

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 2

| aceptada

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 1

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 1

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

casi 4 años hace | 1

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

casi 4 años hace | 1

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

casi 4 años hace | 1

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 1

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

casi 4 años hace | 1

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 1

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

casi 4 años hace | 3

| aceptada

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

casi 4 años hace | 4

| aceptada

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

casi 4 años hace | 1

Cargar más