Answered
How to impliment Genetic Algorithms without Boundaries?
I don't think you can do so if there are absolutely no limits, mainly for the same reason that you cannot generate a random unif...

9 years ago | 1

| accepted

Answered
How to get maxima that are not on a current datapoint?
Um, you used pchip? !!! Yes, I predict that was what you did wrong. Without looking at it more deeply to see if you have some...

9 years ago | 1

| accepted

Answered
How to get a and b using fit(x,y,power1)
Learn to use MATLAB classes. x= rand(10,1);y = rand(10,1); mdl = fit(x,y,'power1') mdl = General model P...

9 years ago | 1

| accepted

Answered
fmincon finds solutions close to the middle of the range
When you change the bounds, a DIFFERENT solution can easily be arrived at. Having the bounds there will impact the path that is ...

9 years ago | 1

Answered
Wrong number of arguments to operator error
Answer, based on the comment by Scott: The thing is, it appears that i is not intended here as sqrt(-1), nor is j. I woul...

9 years ago | 0

Answered
Wrong number of arguments to operator error
Most operators are either monadic (one operand) or dyadic (two operands). This refers to the number of arguments the operator wo...

9 years ago | 1

Answered
Please , how can I find the center and the radius of the inscribed circle of a set of points
The largest incircle of a scattered set may be difficult to find. A simple heuristic, like that suggested by Jim will work if th...

9 years ago | 0

Answered
Does a fitness function for GA toolbox have to be linear to be solved?
There is no requirement that the objective be linear for GA. That does not mean that any objective will work. So create a highly...

9 years ago | 0

Answered
How to solve minimization problem for matrix system
A bit confusing to say the least. First, you tell us that x2 is a MATRIX of size 4x1. Then you talk about element x(2,2)? I can ...

9 years ago | 0

Answered
I'm trying to plot the function: x(t) = 20*cos(2*pi*500*t). When I try to do this, nothing is plotted and i'm not sure why. The x and y limits are also incorrect. What can i do to fix this?
So what do you think happens when you write this? t = 0:0.005; Did you look at the results of that operation? Why not? A...

9 years ago | 1

| accepted

Answered
Dynamic comments on variables?
As the others have said, no you cannot do this. At least not without writing your own classes for no reason except to be friendl...

9 years ago | 0

Answered
How to set up linear constraints for an optimization problem with two variables.
You have a vector of 24 unknowns. Assume the vector is a column vector, so a 24x1 vector. Can you write a dot product that ex...

9 years ago | 0

Answered
Hi! How to decrease the computation time of calculating eigenvalues and eigenvectors of large sparse matrices like 10000X10000(I need all the eigenvalues so I can't use eigs)?
The simple answer is, I doubt it. But that might not be the complete answer, or even the correct one. And see that any answer th...

9 years ago | 2

| accepted

Answered
How do I force the minimum of a quadratic polyfit to y = 0.
A quadratic polynomial that touches the axis at x == 0? Are you asking for a polynomial that CROSSES the axis there? Yes,...

9 years ago | 2

Answered
Interpolation with multiple intersection points
Interp1 is defined for functions that have a SINGLE y value for any x. Since you are trying to call it for frequency as a functi...

9 years ago | 1

| accepted

Answered
What is the way to get an optimum or near optimum combination of different columns (contains 1 and 0 only) to be equal to particular column (In my case, it's all 1 column)?
If you knew an exact solution existed, then intlinprog would be perfect. By the way, it is a bad idea to use the name Input f...

9 years ago | 3

| accepted

Answered
How can I model a distribution for a data set if I know how each sample behaves
So you have two datasets, thus sets of (x,y) pairs. Almost always it will be appropriate to log the model. Data that follows mod...

9 years ago | 0

Answered
Assign Beta distribution to set of integers
These are not integers anyway. But what stops you from normalizing them so they lie in [0,1]? xmin = min(x); xmax = m...

9 years ago | 1

| accepted

Answered
When solving a system of nonlinear equations, is it possible that some unknowns remain arbitrary?
It is actually quite easy for a system of equations to behave as you have found. It probably just means that you really don't ha...

9 years ago | 0

Answered
Is there a way to use my own function file for a Matlab function?
That is exactly how to solve the problem - just put it in a directory on your search path above the IPT directory. Note that ...

9 years ago | 0

Answered
This is the code for FFT Accumulation Method using autocorrelation.correct this code .we are receiving an error as Function definitions are not permitted in this context.
Older releases of MATLAB do not allow functions to be defined as part of script. So either learn to save your functions as an m-...

9 years ago | 0

| accepted

Answered
Can I read a image?
No. That is just a picture of some numbers. They are not stored as numbers, but just as pixels, that you happen to understand as...

9 years ago | 0

Answered
It doesn't count right
Hmm. I wonder if you are using MATLAB wrongly. At least, the version of MATLAB that you happen to be using. For example, when I ...

9 years ago | 1

Answered
if does not work
If DOES work. At least it does if you write the test properly. elseif -1<= ee(k)<= 1 is wrong. People never seem to r...

9 years ago | 1

Answered
Can Matlab row reduce this matrix?
I'm not positive what you are looking for. Make x,y,z,w symbolic variables. syms x y z w Now, construct your array, a...

9 years ago | 2

Answered
How to get the solution of AX=b using Conjugate gradient with A non square?
Since this is surely homework, to forestall someone else just doing your homework for you, I'll give you a hint: Tools like p...

9 years ago | 0

Answered
How to find the inflections points in noisy, variable data cycles?
I think you are looking at this the wrong way. You are looking to use findpeaks. But really, you should look for where in the...

9 years ago | 1

Answered
How can I easily update variables in a written code and share with peers?
Don't write a script, something that needs people to edit the code. NEVER write code that way. Yes, I know they taught you to us...

9 years ago | 0

Answered
Problem with nonlinear solver fsolve??
Note my use of .* in there, to allow vectorized input. g=@(x)((0.01783926*sin(0.02077086*x)/7155831.61.*x)-1.7519952539) ...

9 years ago | 0

Answered
Underwater optical wireless communication (Matlab simulation)
Looking at your code, it seems essentially correct. It is a fairly standard normal distribution, with mode at zmax, standard dev...

9 years ago | 0

Load more