Answered
How to searh for very similar strings?
You probably want to do some reading here: https://en.wikipedia.org/wiki/Levenshtein_distance Plus, I see lots of code provide...

8 years ago | 3

| accepted

Answered
Excel solver in Matlab with fmincon
First, I'd suggest that you are thinking in tems of a spreadsheet. You are wanting to write MATLAB code, while still programming...

8 years ago | 0

| accepted

Answered
What functions are valid for optimization expressions?
NO. It is absolutely, simply NOT true that functions can "only" use simple operations like sum or matrix ops. At the same time...

8 years ago | 0

Answered
How to caculate a bass model.
Totally impossible. y = m*(1-exp(-(p+q)*x))/(1+(q/q)*exp(-(p+q)*x)) First, I notice the q/q term in there. sorry, but unle...

8 years ago | 1

Answered
Extracting information from an object into variables?
I assume this returns an object of some ilk, though I do not have the necessary toolbox to verify that assertion. When you don'...

8 years ago | 0

| accepted

Answered
Trouble solving equation fsolve
Not sure what the problem is. And why are you asking about fsolve? a = 1.66; b = 0.000127; c = 2.5; d = 0.000423; g = 9.81;...

8 years ago | 0

Answered
Problem concerning floatin point representation.
There are tiny somewhat unpredictable errors in the least significant bits of a number. Not random, but unpredictable. As you f...

8 years ago | 2

Answered
How to specify one eigenvector then find the rest.
Sorry, but no. You cannot just decide that the vector of all ones is an eigenvector. An eigenvector has a very specific property...

8 years ago | 0

| accepted

Answered
sparse matrix problem in solve systems of linear equations
J is not sparse. In fact, J is essentially a full matrix. It has no zeros in it at all! So why are you using sparse matrix stora...

8 years ago | 2

| accepted

Answered
How to create a 32-bit and 64-bit truth table?
You can't. Be serious. An n-bit truth table has n*2^n elements in it. Even if one byte is assigned to each element, that should ...

8 years ago | 3

| accepted

Answered
Solving system of equations with constraints
Linear programming returns the optimal solution. You want another optimal solution? How many optimal solutions are there? :) Ok,...

8 years ago | 1

| accepted

Answered
Savitzky Golay for cyclic data
So the first and last rows form a cyclic boundary? Easy peasy. :) First, make up some garbage data. R1 = rand(1,10); A = [R1;...

8 years ago | 0

| accepted

Answered
Row reduction using modular arithmetic
I must have been bored this morning. So I hacked rref to produce rrefgf. It will work for any integer ring as induced by a given...

8 years ago | 4

| accepted

Answered
extract points from spline
Ok, so you are drawing hull sections. For each z, I gather what you mean by this is you have a curve for each value of z, so som...

8 years ago | 3

| accepted

Answered
how to get a number A which is divisible by a specific number B?
As an alternative to the one proposed by Madhan Ravi (which is the correct way to modify the proposed code to actually solve the...

8 years ago | 5

| accepted

Answered
"solve " function returns inaccurate solutions
Ok. It looks like your real question is where does the spurious root arise? And, since you are using an old enough release of MA...

8 years ago | 5

| accepted

Answered
Optimization Problem using fminunc
Why is it a problem? You are trying to minimize a function. fminunc stopped, having told you that is cannot go any further, be...

8 years ago | 1

Answered
"solve " function returns inaccurate solutions
Works for me: syms x S = solve(x-sqrt(x+1)-sqrt(x-1)) S = root(z^4 - 2*z^3 + 2*z^2 - 2*z - 1, z, 4)^2 + 1 vpa(S) ans = 3....

8 years ago | 0

Answered
How to supply user gradient in simultaneous fitting with lsqcurvefit
This problem is linear in the parameters. Supplying the gradient is a waste of time. In fact, using lsqcurvefit is a waste of ti...

8 years ago | 2

Answered
Lorenz Equation || Vector lengths should be the same
First, you need to learn how to preallocate your vectors, and why. That code will be inefficient, because x, y, and z are all be...

8 years ago | 0

| accepted

Answered
what is time efficiency
The timing for any function in a tool like MATLAB depends on a huge number of things, not all of which are under the control of ...

8 years ago | 1

Answered
Correction of XYZ data with Interpolation?
Sorry, but you have a few misconceptions here. Interp2 is not an outlier detection algorithm. (What you need for something like...

8 years ago | 0

| accepted

Answered
Tangent at a given point to a nonlinear curve
Why not try using a spline? Actually, given that slope discontinuity at the beginning of your curve, you would use pchip. That i...

8 years ago | 0

Answered
Roots of nonlinear eqn
Well, you did come back and make an effort. There are infinitely many roots. First though, fully use the . operators to get rid...

8 years ago | 0

| accepted

Answered
genetic algorithm with different results at each run
A genetic algorithm is a stochastic algorithm, based on random sampling! What do you seriously expect? No matter what, you will...

8 years ago | 0

Answered
Zeros from a spline (csapi and spapi)
Download my SLM toolbox. Well, not because you need to use the SLM engine itself, but because you want to use slmsolve. The nice...

8 years ago | 0

| accepted

Answered
matlab polyfit with ax+by=c format
Why would you fit a straight line to that data in the first place? plot(x,y,'o') What did you expect to see? I would suggest...

8 years ago | 1

Answered
lognpdf drawn by parameters from lognfit doenst fit data at all
Look carefully at your data! always do this when you have a problem. Then think about what you see. Bindistd(:,3) ans = ...

8 years ago | 1

| accepted

Answered
what is the best fit for a set of data?
I think you need to spend some time learning about modeling. Do some reading. Lots of stuff online to be found. You would want t...

8 years ago | 0

| accepted

Answered
why tis matrix is sparse?
You can define anything you want to be sparse if you so desire. So sparse(ones(1000)) will produce a sparse matrix. ;-) But ser...

8 years ago | 2

| accepted

Load more