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

6 years 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...

6 years 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...

6 years 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...

6 years 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...

6 years 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....

6 years ago | 12

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

6 years 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 ...

6 years 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...

6 years 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...

6 years 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 ...

6 years 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. ...

6 years ago | 3

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

6 years 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...

6 years ago | 1

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

6 years 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...

6 years 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...

6 years 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 ...

6 years ago | 1

Answered
Remove portion points in a square boundary
ra(all(ra >= 0,2) & all(ra<=2,2),:) = [];

6 years 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...

6 years 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...

6 years 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 ...

6 years 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...

6 years 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...

6 years 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...

6 years 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 ...

6 years ago | 0

Answered
how to obtain the basis vector of the space orthogonal to K vectors?
null is the tool to do exactly that.

6 years ago | 2

| accepted

Answered
What kinds of operation can be speeded up by reducing significant digits using VPA/Digits
I think you misunderstand. vpa is not just something that you can use to dial in your own choice of precision as easily as you w...

6 years ago | 0

| accepted

Answered
Error: Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.
A simple rule in MATLAB: You cannot assign a result to a result. What is Rr' then? This is the conjugate transpose of the array...

6 years ago | 0

Answered
Rectangular matrix manipulation with triu and tril
tril and triu are set so they work from the top left corner. You don't want them to work that way. So you could write your own v...

6 years ago | 2

Load more