Answered
fsolve stopped because the problem appears regular
It is NEVER a good idea to start any optimization at zero. That may easily screw up the gradient estimation, in case the code us...

9 years ago | 0

| accepted

Answered
find the nearest larger integer to n(n=1234567),which is not divisible by any integer between [2:100]
You are getting pretty close. Here is your latest version: n=1234567; a=0; while a==0 for j = 2:100 ...

9 years ago | 1

Answered
How to crop my curve in the curve fitting tool ?
Just crop the data BEFORE it goes into the curvefitting tool. Only pass in what you knowyou want to fit. Why is this a problem?

9 years ago | 1

| accepted

Answered
Eigenvector calculation; to get dominant eigen vector
The immediate answer is that eigenvectors are defined only to within a constant multiplier. Multiply an eigenvector by ANY const...

9 years ago | 0

Answered
Is there any way to get out NaN for length(x)?
Why would there be? Why do you possibly want to do so? Or, are you asking how this might happen, since you got that as a resu...

9 years ago | 0

Answered
Converting data set (x,y) into a function f(x,y) not necessarily a polynomial fit .
In general, NO. This is impossible to do, to infer the real function that lies beyond some data. If you have function values,...

9 years ago | 1

| accepted

Answered
Broken stick regression and find change point
Since you provide no data, I'll make some up. plot(xdata,ydata,'o') grid on <</matlabcentral/answers/uploaded_files/9...

9 years ago | 7

| accepted

Answered
Unsolvable cases and diagonal element to 1s
So then you need to test for a case where the pivot element is zero. The problem is, that pivot will virtually NEVER be exac...

9 years ago | 1

Answered
Solve for discount rate for a matrix of cash flows and a vector of PV
Um, you don't need to do it that way? In fact, solving it that way is just a bit silly? This problem reduces to something lik...

9 years ago | 2

| accepted

Answered
Fitting surface only to the top layer of points
You have not provided your data, so I cannot show you how to solve the problem on your data. I guess I could make up some data. ...

9 years ago | 1

| accepted

Answered
Equalizing array of uknowns with a known array
You can't assign a numerical value to a string. I would suggest creating a struct. This is a good way of storing such paramet...

9 years ago | 2

Answered
how can i multiply 2 matrices with different dimension ?
Um, read the getting started tutorials? AnVel = Rr*PQRg; It is legal to read the documentation. You might even learn how...

9 years ago | 0

Answered
Combining different mesh granularities
This is more a question of understanding graphics. Of understanding what you are doing. You need to consider that your monito...

9 years ago | 0

Answered
How do I use a loop variable in the initial conditions in ODE45?
No. As you did it, it is not possible. You are trying to solve multiple problems in one call to ODE45. Instead, just learn to us...

9 years ago | 0

| accepted

Answered
Permutations Inversions Counting ... speed up
Why do people always think there is something they could have done that was faster? You are doing something on the order of 2 bi...

9 years ago | 0

Answered
Newton's Method preferring a direction for convergence?
Ye gawds, a lot of problems here. Minor issue: First of all, these are not poles you are looking for. Fun has two roots or ze...

9 years ago | 0

Answered
Where can i Download Matlab for my MAC
The MathWorks will SELL you a copy, that you can then download. No, you cannot download MATLAB for free, although you can get a ...

9 years ago | 1

Answered
What function can I use for finding global optima in semi-infinite constraint optimization problem?
Why not? Only you know what is inside f, so being able to say, of course it can, this is impossible to know. Of course, you s...

9 years ago | 0

Answered
Error in Bisection Method
NEVER hard code a function. Outside of the loop, you appear to be tring to solve the function x^3 - 20 + exp(x) == 0 In...

9 years ago | 1

| accepted

Answered
Find Coefficent Matrix by given solutions and right handside
Effectively, you are trying to solve for a matrix A, such that A*X = B where X and B have multiple columns. So X and B ...

9 years ago | 0

| accepted

Answered
How can I split a 420x7 matrix into 60 7x7 matrices?
DON'T DO IT!!!!!! Instead, learn how to use three dimensional arrays. Learn how to work with them, how to create them. For ex...

9 years ago | 3

| accepted

Answered
Create help that displays in the help window for a variable that loads in the workspace.
There is no facility to provide user written help on a variable, or mouseover capability to do the same. Perhaps an option is...

9 years ago | 1

| accepted

Answered
What is command for row echelon form of a matrix in MATLAB
Perhaps you are thinking of rref? help rref When you don't know the name of a function, learn to use lookfor. For exampl...

9 years ago | 1

| accepted

Answered
differences between rgb 0to1 and 0to256
The transformation IS linear. Of course, once you convert to the [0,255] interval, you will be representing the pixels as uint8....

9 years ago | 1

Answered
Fit curve to data, without extrapolation
I think you misunderstand how things like this work. A smoothing spline is defined on only the support of your data. y...

9 years ago | 0

Answered
COND for homogeneous equations?
The question is, I know you are singular, but just HOW singular are you? ;-) It seems to me there are several questions of inter...

9 years ago | 2

| accepted

Answered
Matlab Script Accuracy of Results
You made a LOT of mistakes. delx = 1; x = 0; y = exp(x); So you set x to zero. Then you evaluated exp(x). That...

9 years ago | 0

| accepted

Answered
Help with optimizing the curve fitting function
The simple answer is to log your model. Then a call to polyfit will suffice, and polyfit is fast. log(y) = log(a) + b*log(x...

9 years ago | 1

| accepted

Answered
Solving one equation for the value of two variables
Hint: You could use a contour plot, in the variables cA and cB. You want only ONE contour level, at 0.79/0.21. Think about wh...

9 years ago | 0

Answered
How do you graph a function and have the hole in it visible and how do you also graph a point not on the function but on the same graph?
What is a "hole" in your mind? Yes, there is a problem of having 0/0 at that one point. But a single point has no width. There i...

9 years ago | 0

Load more