Answered
interpolation of scatter data
First, your original contour plot. Next, the interpolated one. So much noisier. Interpolation does not necessarily make th...

7 years ago | 0

| accepted

Answered
How to Solve Non-Linear Equation with changing coefficient
Note there is no need to use fzero. Roots is entirely adequate, and more accurate. Roots also recognizes there are TWO real solu...

7 years ago | 2

Answered
Interp1 command, wrong number of input arguments
Read the help for interp1. With 4 input arguments: Vq = interp1(X,V,Xq,METHOD) specifies the interpolation method. The a...

7 years ago | 0

Answered
how to make 2d lookup table when having 3 vectors
The problem is, your data is insufficient to create a 2-d surface from only that data. (Yes, you CAN use a scatteredInterpolant,...

7 years ago | 0

Answered
Numerical solution of a matlab function.
This is just a continuation of the last time the same question was asked, and answered. https://www.mathworks.com/matlabcentral...

7 years ago | 1

Answered
How do I test a vector element by element for imaginary elements
What does the function imag return? Given that, what would imag( r ) ~= 0 tell you? see that it returns a true or false valu...

7 years ago | 0

| accepted

Answered
Print all possible matrix combinations for a given matrix
You are going mad because ... Your problem is poorly formulated. i.e., how close to S/3 do you need to be? For long vectors, y...

7 years ago | 2

Answered
Finding pythagoras triples when only c is known
Alternatively... Talk to Euclid. An old guy, maybe even dead by now. He gave us a formula for Pythagorean triples. https://en....

7 years ago | 5

| accepted

Answered
How can I make magic matrix if I know the diagonal
Not all problems have a solution. But sometimes, they do, IF you are willing to relax some conditions. A classical magic square ...

7 years ago | 4

| accepted

Answered
does the query points in gridfit function need to start from zero?
No. There is no requirement about needing to start from zero. In fact, those were WARNINGS, not errors. It MAY indicate a proble...

7 years ago | 0

| accepted

Answered
Data point missing in if statement
Let me explain separately, since you are misssing the point. The important point is NOT that there are duplicated points at (5...

7 years ago | 0

| accepted

Answered
Locating a point along a curve some distance away from an initial point.
Easy, peasy. That is, assuming you are asking about a distance in terms of arclength along the curve. If not, then the answer is...

7 years ago | 5

| accepted

Answered
how to get the numerical solution of Non linear equation for unknown variable
Confusing. That usually means the person is also confused. We are shown an integral on the left hand side. It is an integral ov...

7 years ago | 0

Answered
what is tje problem whit the function "solve"?
Is zero a valid solution? It appears to be so. (By the way, you don't put the names of the variables in quotes to call solve. Bu...

7 years ago | 1

| accepted

Answered
right triangle area within a certain tolerence
You have two problems in one line. Worse, you have two problems virtually within the same character. Hey, that could be a record...

7 years ago | 0

Answered
solve and vpasolve command doesn't work
I always need to laugh when someone says solve does not work, yet they never invested any thought in what they were trying to ma...

7 years ago | 1

| accepted

Answered
Results for an optimization problem are coming different which usually does not happen.
It is a little hard to follow these equations, since you change nomenclature. Lets see, it looks like x becomes I. y is GO, and ...

7 years ago | 2

Answered
fitting a funciton with minimax error
mat =xlsread('example2.xlsx','Sheet1','A2:C32'); density = mat(:,1); Z_MD = mat(:,3); eta = mat(:,2); eta_c = 1/1.55; Your ...

7 years ago | 2

| accepted

Answered
How to find where a variable was set?
Not very easily. Depending on how nasty and convoluted the code is, you can easily have something that is essentially impossible...

7 years ago | 1

Answered
euler method first order
Um, no? Not correct. Not terrible. Even pretty close. But not correct. You got a lot of it right. You preallocated y_euler corre...

7 years ago | 1

| accepted

Answered
Is there a way to evaluate the length/area of a connected cubic spline?
Seems pretty easy to me. Well, easy enough. Ok, well doable. Compute the area inside an ellipse, centered at [2,3], all done by...

7 years ago | 1

| accepted

Answered
What does ''Error using horzcat Dimensions of arrays being concatenated are not consistent'' means in the problem below?
The problem is, we do not see your data. Only you can. However the one thing that is painfully obvious is that your model is lin...

7 years ago | 0

| accepted

Answered
Mean over specific columns
Easy peasy? Convert to an array first of course. Or, if some of those columns are non-numeric, then convert only the indicated c...

7 years ago | 1

Answered
Spline to optimize the curve
It seems you want to interpolate these points, doing so smoothly, yet not going outside the data. xy = [ 2.0000 2.0000 2.27...

7 years ago | 1

Answered
Error in solving double integration
Don't make people guess what error you got. TELL US. Paste in the COMPLETE message, thus everything in red. Today, on your ques...

7 years ago | 0

| accepted

Answered
How can I create this function on MATLAB?
With only 1/k in the denominator, that sum will take forever to give you any degree of precision in the sum. So that degree of p...

7 years ago | 1

| accepted

Answered
Plotting a Constant Section for a Piecewise Function
Your problem lies in your assumptions. Try this example: t = 0:10 t = 0 1 2 3 4 5 6 7 8 ...

7 years ago | 2

| accepted

Answered
Trapz error ORDER contains an invalid permutation index.
If you call trapz using TWO arguments, the second of which is a scalar, then it is assumed you want to use the second argument t...

7 years ago | 1

Answered
How can I find if an element of my array is divisible with 0.05
Um, no. And, Yes. Floating point numbers like 0.05 are NOT EXACTLY representable in double precision. Remember that doubles are...

7 years ago | 1

| accepted

Answered
Find columns of a Matrix (n x m) that fit best to a Vector (n x 1)
You need first to decide what it means to "fit best". For example, I'll just make up some data here. data = rand(3,20); >> dat...

7 years ago | 1

| accepted

Load more