Answered
Matlab plotting blank figures when equation features a log
LoL. You are trying to do all sorts of things that are of no value, when your problem was in not appreciating how to divide the ...

6 years ago | 1

| accepted

Answered
Graphing level curves for an e^x function
You did just fine. What you don't recognize is the function you are trying to plot varies by so many order of magnitudes. That ...

6 years ago | 2

| accepted

Answered
How to increase the efficiency of GA with increase in number of parameters?
Bigger problems often require bigger computers. Sometimes, the ingestion of large amounts of coffee while you await the solution...

6 years ago | 0

Answered
Solve laplace equation in a closed form with boundary condition
No. There is (currently, but thing do change) no MATLAB utility that will alllow you to provide a fully general PDE, with your o...

6 years ago | 1

Answered
Illustrate two close curves
There really is little way to visualize the difference between two curves that are so close together that they overlay completel...

6 years ago | 1

Answered
Matlab is calculating standard deviation wrongly
A = [1 2 3;4 5 6;7 8 9] A = 1 2 3 4 5 6 7 8 9 >> std(A) ans = 3 3 3 ...

6 years ago | 1

Answered
Optimization with Probabilistic Constraint
You cannot use a tool like fmincon for this. It requires deterministic and differentiable constraints. For that matter, even GA ...

6 years ago | 0

Answered
Why does size(X, 100) return 1?
Because that is how MATLAB works. Any array of finite size is treated as one with infinitely many trailing dimensions of size 1....

6 years ago | 0

| accepted

Answered
BUG in nargin < 3
How is this a bug? Well, a bug in your code. What do you expect to happen for 3 arguments? We see this test: if nargin < 3 So...

6 years ago | 0

Answered
ODE45 randomly returns vector of length 1.
If it happens with almost every script that you run, though not immediately, then it is something you are doing that is strange,...

6 years ago | 0

Answered
Creating Multiple Variable Polynomial Function Using Datapoints
You have not shown the actual data. A picture is worth a thousand words. But if you attach the data, perhaps now 2000 words. ;) ...

6 years ago | 1

Answered
Curve Fitting Tool custom equation producing nonsensical results
I'm not sure why you think it produces nonsenical results. Ok, I might guess. First, the model you REALLY need to use is a NEGA...

6 years ago | 0

Answered
Does assigning a large value to a variable do the job of var -- inf well?
Be serious. Does it do the job well? Yes. Or definitely not. Probably maybe, approximately so. To answer your question completel...

6 years ago | 1

Answered
three touple Random number generation
You say nothing about the distribution of the desired numbers. But why not try something? For example, what does this do? cumsu...

6 years ago | 1

Answered
Initial conditions for solving numerically a second order ODE
Several problems in your code. First, you don't pass the initial conditions into odeToVectorField. It is not solving your ODE f...

6 years ago | 1

Answered
Group Constraints for FMINCON
Approximately equals is NOT an equality constraint. But you can write it as TWO inequality constraints. So if you want kappa*g...

6 years ago | 1

| accepted

Answered
atan2 giving larger than expected negative outputs
What you don't understand is the geometry, and perhaps how to interpret what atan2d tells you. (Was it really necessary to pos...

6 years ago | 1

Answered
How can I find the values for Settting Start Points when fitting point to a curve?
First, you don't understand how to use fittype. fittype does not set something that fit can use, UNLESS YOU PASS IN THE RESULTS ...

6 years ago | 1

| accepted

Answered
How to handle MATLAB UNDERFLOW Problem?
Answer, you can't. That is, if you want to use an extended precision IEEE floating point number in MATLAB, you can't. What can y...

6 years ago | 0

Answered
solving coupled differential equation
What is the problem? Is it that you do not know how to turn a second order ODE into two first order ODES? You can look at the ex...

6 years ago | 0

Answered
Help me with this problem
Just look at your code. THINK about the line in question. Here are the relevant lines. b=[b0,b1,b2,b3]; for i=1:4 b0(:,i)= b...

6 years ago | 0

Answered
Two SImilar answer of a MATLAB Question
Don't worry about it. It is often the case where two people write very much the same response, but one of them must be slower th...

6 years ago | 4

| accepted

Answered
The calculated R squared is not equal to the squared of correlation coefficient by Matlab functions corr
What I do not see is the actual model you used. Did you use a linear model? Was there a constant term in the model? The problem ...

6 years ago | 0

Answered
arrayfun and normpdf error
It looks like Walter has resolved the issue with an explicit error. However, the other problem of zeros still persists. Almost a...

6 years ago | 0

Answered
How to draw a tangent line to the curve?(tangent line has to pass through origin)
You are plotting a parabola on its side. Then you want to find the point where a line that passes through the origin, is also ta...

6 years ago | 1

| accepted

Answered
Objective function problem using "fmincon"
Whenever you have an optimization problem, a good first step is to verify that IF you pass in two slightly different set of para...

6 years ago | 0

| accepted

Answered
Imposing variable in script
First, this sounds as if you are using globals to pass your variables around. UGH. If there is one painful thing that globals wi...

6 years ago | 0

| accepted

Answered
Simplifying solution to algebraic system of equations
It would be almost as easy to solve by hand. >> sol = solve(eq1,eq2,[a,b]); >> real(sol.a) ans = 8*2^(1/2) + 36/5 >> im...

6 years ago | 0

| accepted

Answered
Combination of two values that equal a sum
Simpler than using meshgrid, if we know that a and b live in the unit square, thus [0,1]X[0,1], AND that the sum a+b=1.525, then...

6 years ago | 0

Answered
Solve set of inequalities
You cannot use tools like fsolve or vpasolve to solve systems of inequalities. They are not designed to do that. Really, your go...

6 years ago | 2

| accepted

Load more