Answered
The integer data sructures such as int8 or int16 has NaN values?
No. Integer variables such as int8 or int16 do not allow NaN as an element. A simple test answers the question. u = int8([0...

10 years ago | 0

| accepted

Answered
Problem in solution from Linprog
Time to learn about the 'ConstraintTolerance' parameter, and about floating point arithmetic in general. Are those values rea...

10 years ago | 1

| accepted

Answered
Time bang/system calls are inaccurate (way too high)
I'd strongly recommend using timeit instead of tic and toc. It is designed to avoid many of the potential timing problems that c...

10 years ago | 0

Answered
solution of differential equation
Really? It is wrong? So, I guess this must be a bug of some kind? syms t C3 x = C3*exp(-t) - (2^(1 /2)*cos(pi/4 + t))/2;...

10 years ago | 0

| accepted

Answered
binary non-linear-optimization with a variable in the denominator
Never divide by zero. The result is meaningless. Well, maybe +/- inf, sometimes NaN, but all equally useless. Optimizations o...

10 years ago | 0

Answered
Why RMSE obtained by fitlm in matlab does not match with RMSE calculated in EXCEL ؟
Your known formula is not always the formula that one might use. In fact, there is a subtly different alternative. You divide...

10 years ago | 5

| accepted

Answered
How to plot this function in matlab?
help exp help ezplot Subtract x. Don't have the equality in there. ezplot will assume the result is implicitly equal to ...

10 years ago | 0

Answered
problem finding limits when L'hopital's rule is needed
As always, you need to be careful when using floating point numbers. See the difference between what I wrote here, and what you ...

10 years ago | 1

| accepted

Answered
Is there a way to define a tolerance for an equation that I want to solve numerically?
Why are you using symbolic tools? I see too many people using syms for simple problems that have no need at all for anything sym...

10 years ago | 0

| accepted

Answered
How to smoothing sharp bends
I'm not sure I see what is the problem. You have two lines that intersect in a known point. Solve for the equation of a circl...

10 years ago | 0

Answered
Over determined system of non-linear equations using lsqnonin function
Why do people not like to plot things? 3 of your equations are hyperbolic arcs. The other is a straight line. h(1) = ezplot...

10 years ago | 2

Answered
fsolve and symbolic non-linear system of equations
This is a basic nonlinear least squares problem. Use lsqnonlin or lsqcurvefit to solve it. There is no need at all to do ANY...

10 years ago | 0

Answered
How to add units to a number and differentiate between different inputs
You can't easily use units in MATLAB. Ok, you can do some tricks with the symbolic toolbox. Or, there is even a units tool that ...

10 years ago | 1

Answered
Is there an option in lsqcurvefit function in matlab to set different limits to each of the best fit coefficients ?
Of course you can set "bounds" on the variables. But no, you are wrong that they must all be the same value. If x is the unknown...

10 years ago | 0

| accepted

Answered
How to enter an ln equation in a bisect function?
But that is not how you define a function. READ THE HELP! Look at the examples. func = @(x) log(x.^2) - 0.7; - x is the ...

10 years ago | 0

| accepted

Answered
Curve interpolation - creating a path from control points (interp1 can't reflect a circle)
I would suggest those interpolations did remarkably well. Did you expect some spline interpolant to magically intuit that this i...

10 years ago | 1

Answered
Non-linear formula optimization using Matlab
You need to be far more clear about your goals to get meaningful help. Often this is because you don't really know what your goa...

10 years ago | 0

Answered
Nelder-Mead initial simplex size
I don't see the problem. fminsearch is also able to expand the simplex. Also, not starting it out from zero can help. If it uses...

10 years ago | 1

| accepted

Answered
what is the mistake,
I'll suggest your mistake is one of definition. What do you expect when you multiply the elements of the first column with th...

10 years ago | 0

| accepted

Answered
How to generate Rayleigh distributed random variable with a specified mean and variance?
Um, you can't. A classic Rayleigh distribution has ONE parameter. Call it sigma. https://en.wikipedia.org/wiki/Rayleigh_distr...

10 years ago | 1

Answered
Optimum solution for system of a large number of equations
Yes. Backslash is a linear least squares solver. So you can call it a "best" estimate. Anyway, first look at the ratios. You ...

10 years ago | 0

Answered
what wrong with the fallowing codes?
Seems pretty straightforward, assuming I interpret your question properly. % some completely arbitrary matrix A = rand(2...

10 years ago | 0

| accepted

Answered
i need to create a matrix from 2 vectors
Is there a reason why you wrote this in your code? meshgrid(X0, Y0); See that it does absolutely nothing but waste CPU c...

10 years ago | 2

| accepted

Answered
An error occured in the description of the QR algorithm in the help file of R2016a
Sorry, but you are wrong. The QR help is correct. For an mxn matrix A, qr(A) computes: Q is mxm orthogonal. R is mxn, r...

10 years ago | 0

| accepted

Answered
Taking a matrix to a very large power.
Actually, taking the log of your elements will not work, since raising a matrix to some power requires addition too. If you were...

10 years ago | 1

Answered
How can i add parameters intlinprog
That makes your problem nonlinear. intlinprog cannot handle a nonlinear problem. As well, this creates a non-differentiable (...

10 years ago | 0

Answered
How to correctly find the roots of fourth order polynomial in matlab?
Sorry, but this is basic numerical methods 101. You have precision issues working in double precision arithmetic. You can always...

10 years ago | 0

Answered
how to store n matrix in an other matrix of size n
Learn what a cell array is, how to use them, how to define them. doc cell You can also do similar things with structs.

10 years ago | 0

| accepted

Answered
MatLab Eigenvector Graphical Representation for 4x4 matrix
Ok, so you want to plot something in 4 dimensions. After all, that is what the eigenvectors of a 4x4 matrix would be. It is nice...

10 years ago | 0

| accepted

Answered
hi , how to solve cos(x)-cosh(x)=1
Um, no actually that is NOT the answer. In fact, that equation has no real solutions. ezplot(@(x) cos(x) - cosh(x) - 1,[-3,...

10 years ago | 1

Load more