Answered
Creating a matrix using the colon function
An array in MATLAB NEEDS to be rectangular. That is a given. So if the increment is ALWAYS 1 between elements, then the second ...

6 years ago | 1

| accepted

Answered
how to plot a polynom
help polyval

6 years ago | 0

| accepted

Answered
How to set a linear inequality constraint (greater than) in genetic algorithm
You are waiting 2 days to learn how to multiply by -1? If ax1 + bx2 >= c then is it true that -ax1 - bx2 <= -c The point be...

6 years ago | 1

Answered
Padé approximant for a numerical data array
Pade is only defined for a symbolic functions. If all you have is a list of (x,y) pairs, then you cannot use pade. And that appe...

6 years ago | 2

Answered
Problems using the curve fitting app
Without even looking at your data, just your question, you need to understand how any such optimization tool works. Pretend you ...

6 years ago | 2

| accepted

Answered
help me with this plss..( second order with euler method )
In addition to using the variable yDn1 before it was ever defined, your initial condition seems to be y. Thus you set: y = 0 a...

6 years ago | 0

Answered
How o generate random integer value?
You want to allow the numbers [1 2 4 5 7 9 10]. So just generate a random integer from 1 to 7. Then use that vector to index the...

6 years ago | 0

| accepted

Answered
How to apply a fit on this shape?
What does it mean to "fit" it to you? What will you do with that fit? The data is not a function, just a set of points, that hap...

6 years ago | 2

| accepted

Answered
Detect collinear points in a 3d points cloud
I think your problem is in the breath of the search. If you make this a problem of finding sets of three points, then you have t...

6 years ago | 3

| accepted

Answered
Solution to Ax-b
Ok. If your matrix is not full rank, then the answer is easy, though it wil probably not be the answer you want to see. Really, ...

6 years ago | 0

Answered
Help with increased precision.
NO. You don't use vpa. No need to do that, and in fact, vpa would be the wrong tool to use anyway. This works fine though. a =...

6 years ago | 1

| accepted

Answered
Removing replication in matlab
But the string, after you remove the replicates will always be identically the same, just alternating 0's and 1's. If the first ...

6 years ago | 1

Answered
fsolve cant find a solution for some points
It is actually pretty simple to solve this. Remember that fsolve uses a basic algorithm. Start the problem out in the wrong plac...

6 years ago | 2

Answered
lower and upper index in sorted vector
Please don't post pictures of numbers. That makes it more difficult to help you, to answer your question. Why would you make it ...

6 years ago | 0

| accepted

Answered
When does randomness enter a shuffled "deck" of coin tosses.
I put together this simple script. In it you will find perhaps the most efficient scheme for a riffle shuffle that I know of, si...

6 years ago | 0

| accepted

Answered
command window does not recognize the functions in editor
I think you need to learn about the MATLAB search path. While the editor can save a file anywhere you tell it to, when executin...

6 years ago | 0

| accepted

Answered
Binary Quadratic Programming Relaxation
While you could just use a tool like quadprog with continuous varibles in the interval [0,1], then round the result at the end, ...

6 years ago | 0

Answered
Tools used for Sparse Matrix Efficiency
Whoever gave you that advice, about never building a sparse matrix one element at a time must have been very knowledgable, as it...

6 years ago | 3

Answered
Fibonacci even numbers. Code doesn't work for large numbers
Why are you surprised? log2(fibonacci(100)) ans = 68.263 You cannot represent an integer exactly in double precision ...

6 years ago | 3

| accepted

Answered
Block Tri-diagonal Matrix
It may be your lucky day. Just download my blktridiag code from the file exchange. https://www.mathworks.com/matlabcentral/file...

6 years ago | 0

| accepted

Answered
i=1, 2, 3,,, However, when (a-i)> 0 is calculated.
Or, with no loop at all, and no test required. Just i = 1:a-1; station(i+2) = (4-(4-i))*N; This will define the entire vector...

6 years ago | 0

Answered
How to measure the correct circularity??
It would not be unusual for that measure to exceeds 1. For example, given a circle, we would have a perimeter of 2*pi*r. So perm...

6 years ago | 0

Answered
Fitting an exponential using nlinfit
Most of the code you posted is meaningless, since you save only the variables whos Name Size Bytes ...

6 years ago | 0

Answered
random integer condition selection
You want to generate a random number of random numbers? With an additional constraint that all are greater than 0.5? This is far...

6 years ago | 1

Answered
[Solved] Upsampling multidimensional array with interpn
That is NOT a 5 dimensional array. While you may THINK of it as a set of points that live in 5 dimensions, it is NOT a 5-d arra...

6 years ago | 0

| accepted

Answered
Plotting a function (Horner Schema)
While polynomic psychological analysis seems well beyond my talents, Horner's rule is pretty easy. :) And since you made a credi...

6 years ago | 2

| accepted

Answered
Matlab says the matrix is not symmetric
D = rand(100); D = (D + D.')/2; issymmetric(D) ans = logical 1

6 years ago | 2

| accepted

Answered
how can i create a circle with a face color changing radially
[x,y] = meshgrid(linspace(-3,3)); z = exp(-x.^2 - y.^2); H = pcolor(z); H.LineStyle = 'none'; colormap(jet) axis equal ...

6 years ago | 0

| accepted

Answered
Fit a curve on scatter data (main behaviuor)
You "want" the green line. I want the Buffalo Bills to win the Super bowl. Probably not gonna happen in either case. ;-) You wa...

6 years ago | 1

Answered
How can I understand why certain sets of random variates lead to the warning message "Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.136868e-13) at time t=51"?
Nobody yet wants to explain it? The standard reason for this error is because you are creating a problem that is too stiff for ...

6 years ago | 3

| accepted

Load more