Answered

Fitting a Curve to an Uncurling Object

The curve fitting toolbox assumes the functions are SINGLE VALUED. There can only be ONE value of y for any x. If that is not tr...

Fitting a Curve to an Uncurling Object

The curve fitting toolbox assumes the functions are SINGLE VALUED. There can only be ONE value of y for any x. If that is not tr...

10 días ago | 0

Answered

How fast is fminsearch over brute force? or How fminsearch deal with a local/global min?

How fast is it? Since brute force is an extremely poor method to solve anything (unless your name happens to be the incredible H...

How fast is fminsearch over brute force? or How fminsearch deal with a local/global min?

How fast is it? Since brute force is an extremely poor method to solve anything (unless your name happens to be the incredible H...

10 días ago | 0

| accepted

Answered

How to reduce dimension of griddedinterpolant?

whos Name Size Bytes Class Attributes eff_map 500x500 2000000 double ...

How to reduce dimension of griddedinterpolant?

whos Name Size Bytes Class Attributes eff_map 500x500 2000000 double ...

10 días ago | 0

| accepted

Answered

GA vs patternsearch for Integer problem with equality constraints

An exitflag of -2 means that GA never even found a feasible starting point for your problem. A larger population size lets it ra...

GA vs patternsearch for Integer problem with equality constraints

An exitflag of -2 means that GA never even found a feasible starting point for your problem. A larger population size lets it ra...

11 días ago | 1

Answered

Can one run fminsearch for a function defined by cases?

Can you? Yes. Should you? This may sometimes be a poor idea, although it depends on the specific segment functions. Are the seg...

Can one run fminsearch for a function defined by cases?

Can you? Yes. Should you? This may sometimes be a poor idea, although it depends on the specific segment functions. Are the seg...

11 días ago | 1

Answered

Generating parings of numbers and the pairs must not contain the same numbers

As Bruno has said, you are looking for pseudo-random derangements. So just to add some interesting information about derangement...

Generating parings of numbers and the pairs must not contain the same numbers

As Bruno has said, you are looking for pseudo-random derangements. So just to add some interesting information about derangement...

11 días ago | 0

Answered

Int returns Int when decimals input

fw = ((k*l*vi)/c)*(((1+p*l)*vi)/c)^(k-1)*exp(-((1+p*l)*vi)/c)^k ; When k is some non-integer value, you are raising some non-tr...

Int returns Int when decimals input

fw = ((k*l*vi)/c)*(((1+p*l)*vi)/c)^(k-1)*exp(-((1+p*l)*vi)/c)^k ; When k is some non-integer value, you are raising some non-tr...

12 días ago | 1

| accepted

Answered

How to solve linear programming problem?

Second answer, since the problem has now completely changed. Again, MATLAB is still totally unnecessary. Since you will probabl...

How to solve linear programming problem?

Second answer, since the problem has now completely changed. Again, MATLAB is still totally unnecessary. Since you will probabl...

12 días ago | 0

Answered

Why is it the answer from MATLAB is different from the other solving software? Where did I go wrong?

Usually when I see a confused question, where someone says "help, i got a strange answer", the reason is because they were not c...

Why is it the answer from MATLAB is different from the other solving software? Where did I go wrong?

Usually when I see a confused question, where someone says "help, i got a strange answer", the reason is because they were not c...

12 días ago | 1

| accepted

Answered

Extraction of values from a cfit object

When you do not know how to pull some information from a class, the best thing is to try using methods to learn what you can do....

Extraction of values from a cfit object

When you do not know how to pull some information from a class, the best thing is to try using methods to learn what you can do....

12 días ago | 0

Answered

Nonlinear fit to 100 data sets with seven unknown

That you WANT the residual norm to be low is not really that relevant. Pick anything you may choose to want. For example, suppos...

Nonlinear fit to 100 data sets with seven unknown

That you WANT the residual norm to be low is not really that relevant. Pick anything you may choose to want. For example, suppos...

13 días ago | 0

Answered

How can I solve a system of many equations in 2 variables ?

I think you don't understand the concept of linear least squares, or linear regression. You have essentially a problem with 12 ...

How can I solve a system of many equations in 2 variables ?

I think you don't understand the concept of linear least squares, or linear regression. You have essentially a problem with 12 ...

13 días ago | 0

Answered

Circshift function on very large array

Yes, but you need to understand that just because your mind can conceive of an idea, does not mean your computer can solve the t...

Circshift function on very large array

Yes, but you need to understand that just because your mind can conceive of an idea, does not mean your computer can solve the t...

13 días ago | 2

Answered

How do I use files from file exchange?

Download the .zip files. Decompress same. The result will be a directory. Add that directory to your search path. Pathtool is...

How do I use files from file exchange?

Download the .zip files. Decompress same. The result will be a directory. Add that directory to your search path. Pathtool is...

14 días ago | 2

| accepted

Answered

Ax-b, additional constraint

Why is it that you even think you have now 5 unknowns, not 10? Are you hoping that you can decde to fix 5 of those coefficients ...

Ax-b, additional constraint

Why is it that you even think you have now 5 unknowns, not 10? Are you hoping that you can decde to fix 5 of those coefficients ...

14 días ago | 0

Answered

Deleting an Element Modifies Other Elements

No. You are coming to a conclusion based on the wrong assumptions. It is NOT that deleting an element modifies other elements. ...

Deleting an Element Modifies Other Elements

No. You are coming to a conclusion based on the wrong assumptions. It is NOT that deleting an element modifies other elements. ...

14 días ago | 2

Answered

How can one do this calculation?

This is the perfect problem for the accumarray function. I'll add a few rows. A = [1 1 10 1 2 39 1 3 24 1 4 7 1 5 41 2 1 ...

How can one do this calculation?

This is the perfect problem for the accumarray function. I'll add a few rows. A = [1 1 10 1 2 39 1 3 24 1 4 7 1 5 41 2 1 ...

15 días ago | 2

Answered

Polynomial to Matrix form(canonical form)

I assume the question is to resolve a quadratic polynomial, perhaps: Q = x1^2 + 2*x1*x2 + x2^2 into a quadratic form. That...

Polynomial to Matrix form(canonical form)

I assume the question is to resolve a quadratic polynomial, perhaps: Q = x1^2 + 2*x1*x2 + x2^2 into a quadratic form. That...

15 días ago | 0

Answered

find index of missing data point/ extrapolatation

Use the intersections code, written by Doug Schwarz, found for download from the file exchange. I90 = 0.9*max(I); [Tint,Iint...

find index of missing data point/ extrapolatation

Use the intersections code, written by Doug Schwarz, found for download from the file exchange. I90 = 0.9*max(I); [Tint,Iint...

15 días ago | 0

Answered

How can I create a vector with constrains on Matlab?

One approach would be to construct the set of all possible sequences of length perhaps 10. seq10 = char(dec2base(0:59048,3) + 1...

How can I create a vector with constrains on Matlab?

One approach would be to construct the set of all possible sequences of length perhaps 10. seq10 = char(dec2base(0:59048,3) + 1...

15 días ago | 0

Answered

Boundaries points for Linear Programming (graphical)

You probably want to use the code plotregion, by Per Bergström. It can be found on the file exchange. https://www.mathworks.com...

Boundaries points for Linear Programming (graphical)

You probably want to use the code plotregion, by Per Bergström. It can be found on the file exchange. https://www.mathworks.com...

15 días ago | 0

Answered

mean value of polynominal function

The average value of a function over some interval is just the definite integral of the function, then divided by the length of ...

mean value of polynominal function

The average value of a function over some interval is just the definite integral of the function, then divided by the length of ...

15 días ago | 1

Answered

Remove portion points in a square boundary

ra(all(ra >= 0,2) & all(ra<=2,2),:) = [];

Remove portion points in a square boundary

ra(all(ra >= 0,2) & all(ra<=2,2),:) = [];

16 días ago | 1

Answered

Second order polynomial curve of best fit

You need to understand, this data is NOT something a quadratic polynomial will ever fit reasonably. plot(x,y,'o') Don't forg...

Second order polynomial curve of best fit

You need to understand, this data is NOT something a quadratic polynomial will ever fit reasonably. plot(x,y,'o') Don't forg...

16 días ago | 0

Answered

Numerical integration of function to determine Fourier coefficients

Of course, the limits will matter. I will guess if they include 0, for example, you may have a problem. syms k x x1 = pi/4; x...

Numerical integration of function to determine Fourier coefficients

Of course, the limits will matter. I will guess if they include 0, for example, you may have a problem. syms k x x1 = pi/4; x...

16 días ago | 0

| accepted

Answered

solve function give a wrong solution

Just an addendum, though the answer by @Vladimir Sovkov is correct. Using round to convert those results is wrong. Instead use ...

solve function give a wrong solution

Just an addendum, though the answer by @Vladimir Sovkov is correct. Using round to convert those results is wrong. Instead use ...

16 días ago | 0

Answered

Histograms - why does the smallest binsize always give the smallest mean integrated squared error?

Your error is a subtle one, but important to understand why it happens. x = randn(1000,1); xi = -5:0.1:5; histogram(x,xi,'nor...

Histograms - why does the smallest binsize always give the smallest mean integrated squared error?

Your error is a subtle one, but important to understand why it happens. x = randn(1000,1); xi = -5:0.1:5; histogram(x,xi,'nor...

16 días ago | 0

| accepted

Answered

How to solve the matrix K ^ -1 * F where the terms have unknowns?

If K is a 2x2 matrix, parameterized by a,b,c, F is a 2x1 vector, then do exactly what you want. syms a b c K = [14.8482*a+14.8...

How to solve the matrix K ^ -1 * F where the terms have unknowns?

If K is a 2x2 matrix, parameterized by a,b,c, F is a 2x1 vector, then do exactly what you want. syms a b c K = [14.8482*a+14.8...

17 días ago | 0

Answered

Solving a ode with multiple conditions

This is a first order ODE. You can have only ONE condition. However, if k is an unknown, then you could have TWO conditions. A t...

Solving a ode with multiple conditions

This is a first order ODE. You can have only ONE condition. However, if k is an unknown, then you could have TWO conditions. A t...

18 días ago | 0

| accepted

Answered

matlab integration using function

Um, no. And, yes. Sort of. Is that a good, definiitive answer? Depending on the value of b, this has a solution, or no solution ...

matlab integration using function

Um, no. And, yes. Sort of. Is that a good, definiitive answer? Depending on the value of b, this has a solution, or no solution ...

18 días ago | 0