Answered
How to call in a variable from your workspace
Your "code"? Is this a script? If so, then a script already has access to anything in the base workspace. Is this a functi...

10 years ago | 0

Answered
How to use matlab in order to solve an optimization problem with integral and limit constrains?
This really is not a MATLAB question. Simple analysis and reasoning seems to suffice. Assuming you have some KNOWN function T...

10 years ago | 0

Answered
how to run thousands of regressions at the same time
Let me see if I can point you in the right direction. If your goal is to regress the columns using a model like y = a + b*x, ...

10 years ago | 0

Answered
Obtaining smoother polynomials from polyfit for curve fitting (Best Fit Curve) or an alternate function.
It is WAY too late for this answer to be of any help. A high order polynomial fit is almost always bad, if for example, you use ...

10 years ago | 0

Answered
How do you return the value of one vector at specified value of another vector
Why have you not tried the obvious? What does A(B) provide? It appears that you need to spend time reading the gettin...

10 years ago | 0

Answered
I am taking an online Linear Algebra course from University of Texas at Austin through edX. What add-ons or toolboxes should I purchase with my student version of MATLAB?
Why do you need anything additional? MATLAB is designed to do linear algebra. It does that well. If you will do something wit...

10 years ago | 1

| accepted

Answered
MATLAB Sparse Matrix Multiplication Time Complexity
I don't think you can get a valid time order estimate for this, since the time will depend on the sparsity patterns. For exam...

10 years ago | 1

Answered
How much time required to complete a script in loop with higher no. of iterations by knowing time required to complete lower no. of iterations for the same script in matlab?
Sorry. It is not possible to know what your code does, without seeing & understanding that code. Therefore it is not possible to...

10 years ago | 0

Answered
How to solve linear equation using GPU?
Do you have the proper toolbox? I would suggest this: https://www.mathworks.com/products/parallel-computing.html If you do...

10 years ago | 0

Answered
Getting too long terms when calculating taylor series
Learn what vpa will do for you. Even so, expect it to still be a mess.

10 years ago | 0

Answered
How do I interpolate 1D-data if I do not have unique values?
When you have duplicates, so multiple x's with different values for y, interpolation makes no sense since an interpolant require...

10 years ago | 6

Answered
How do I create a function with a variable number of terms for nlinfit?
Your real problem is you are trying to use the wrong tool! This is a LINEAR regression problem, not a nonlinear problem. All ...

10 years ago | 1

| accepted

Answered
What is the matematical formula of smooth spline function?
Congratulations. You are the one millionth person to ask this question. There is no prize though. A spline is a piecewise fun...

10 years ago | 0

Answered
What is the command for making a brand new script, by an already existing script?
There is no special command. Just save a simple file. Use .m as the extension, and it will be interpreted as a script.

10 years ago | 0

Answered
Matrix Multiplication to find unknowns in a loop
Sigh. How many times must I explain this? Why it is bad in terms of numerical analysis? You wrote this: Theta_M1 = (p'*p...

10 years ago | 0

Answered
Optimize pid constants using PSO toolbox
Your problem is, you don't understand how function handles work. Actually, you have several problems in this code, but that is a...

10 years ago | 0

Answered
How can I solve set of non-linear equations.
Starting at all zeros is often a bad idea for an optimization. Better is if you have some more intelligent numbers. Sorry, bu...

10 years ago | 1

| accepted

Answered
Interpolating evenly spaced 2d matrix from 3 arrays
Assuming this corresponds to a single valued function, thus z(x,y), you can use triscatteredinterp or scatteredinterpolant as Wa...

10 years ago | 0

Answered
Curve fitting to a sinusoidal function with non-equally spaced data
No. The fit for THAT model cannot be improved. This is not truly a sine wave, merely a curve that looks vaguely like one. The...

10 years ago | 0

Answered
How can i add vpasolve function on matlab 2012 ?
vpasolve was introduced with R2012b. If you have only R2012a, then you cannot use vpasolve. If a product was not written for ...

10 years ago | 2

Answered
about: lsqnonlin function:What exactly does it mean inconsistent input bounds?
Gosh, suppose that you supplied lb = 1; ub = 0; Do you think that would constitute an inconsistent set of bounds? ...

10 years ago | 0

Answered
Is it ok to have rounding errors when rounding to integers?
In general, you cannot represent numbers (that have digits to the right of the decimal point) exactly in floating point arithmet...

10 years ago | 2

Answered
Show that a larger number is bigger than another large number
Is there a good reason why you would not just use logs? a>b is equivalent to log(a)>log(b), since the log transformation is mono...

10 years ago | 2

Answered
How to find a unique point of a set of data
This is a moderately ill-posed problem. Not as easy as you will hope to see. The problem is, differentiation is a noise amplific...

10 years ago | 1

Answered
gradient descent with noisy data
First of all, fminsearch is NOT a gradient descent algorithm. Calling it that does not make it one. Second, large residual pr...

10 years ago | 0

Answered
We found a possible bug in our Matlab
NO. This is not a bug in MATLAB. This is only a bug in your understanding of floating point numbers and how to work with them. ...

10 years ago | 1

| accepted

Answered
How to keep signs of input parameters fixed while using "levenberg-marquardt" algorithm for lsqcurvefit?
An easy solution is to change your model slightly using a transformation. For example, suppose you wanted to solve for coefficie...

10 years ago | 2

Answered
6-Term Taylor Series Expansion
TSE = @(x,n) sum((-3).^(0:n).*(x(:).^(2*(0:n)+4))./factorial(0:n),2); Note that a 6 term Taylor series has TSE go only to 5...

10 years ago | 0

Answered
How to avoid complex eigenvalues of the matrix in its non-linear regression? (lsqcurvefit)
Eig returns complex eigenvalues because the matrix has complex eigenvalues. This is not an eig problem, or anything you can cont...

10 years ago | 0

| accepted

Answered
How can i obtain a nice curve ?
loglog(x,p) grid on <</matlabcentral/answers/uploaded_files/67539/untitled.jpg>> It seems a decent enough curve to me...

10 years ago | 0

Load more