Answered
Scattered interpolation unexpected peaks in extrapolation results
Walter is correct, in that depending on the scattered data, if some points fall in just the right orientation (or perhaps, in th...

6 years ago | 1

Answered
ENLARGE AND CHANGE COLOR OF A FRACTION IN TITLE !
Not THAT much of a beginner. :) A true beginner thinks Latex is something you find in rubber gloves. :) h1=title('$y = \frac{1...

6 years ago | 0

| accepted

Answered
I try to find the coefficients of the polynomial using nonlinear regression analysis.
That function is not a polynomial. Regardless, use one of many tools, thus lsqcurvefit or lsqnonlin from the optimization toolb...

6 years ago | 0

Answered
how to shade area bounded by the curves x=1 and y =4-x^2?
Create a sequence of points that define the region you want. Since the function has roots at +/- sqrt(2), it is easy to do. If ...

6 years ago | 0

Answered
How can I create a CI after fitting a nonlinear function using LSQCURVEFIT with constraints?
Confidence intervals are more difficult when you have a constrained problem. The issue is when there are active bound or inequal...

6 years ago | 0

Answered
How to solve the linear system in the matlab?
Easy peasy. ab = [2380*E,2385*E]/[Q , -K; Y , T]; a = ab(1:64); b = ab(65:end);

6 years ago | 0

| accepted

Answered
Integral2 for circular plot not working
The warning message from scatteredInterpolant tell you there are duplicate data points in your data. Should you be remotely surp...

6 years ago | 1

Answered
How to exclude range of values in fmincon
+1 to Dana, with a gentle caveat. Dana has offered what MAY be a good idea. That is, fmincon CANNOT handle a disjoint set, thus...

6 years ago | 0

Answered
how to make symbolic computations fast?
No. Your conclusion the only way is VPA is simply wrong. You can use my HPF toolbox instead. It is available for free download f...

6 years ago | 2

Answered
where can i find all the special comment properties ?
These are flags to allow you to supress specific MATLAB code analyzer warnings. https://www.mathworks.com/help/matlab/matlab_p...

6 years ago | 1

| accepted

Answered
plot curves in matlab
fun = @(w,qa) (9*w.^4.*cos(qa))/28000000 - (33*w.^2.*cos(qa))/32000 - (105*cos(qa))/64 + (603*w.^2)/2560000 - (4891*w.^4)/448000...

6 years ago | 0

Answered
solve: Cannot find explicit solution but it have solutions, matlab's bug?
Look at what you have. A linear system of inequalities. Solve is designed to solve equalities. The solution that you have may be...

6 years ago | 2

| accepted

Answered
How to sort a array of matrix based on the maximum value
1. Since these are cell arrays, learn to use cellfun. This is a tool that can apply some function to each element of a cell arra...

6 years ago | 0

Answered
What font do you code in?
Personally, I like a font that puts a slash of some sort through the zeros. Without that, the zero and uppercase O seem too clos...

6 years ago | 1

Answered
Curve fitting with a constrained y value to Zero
This is quite easy, actually. xy = [4.4 2.367224698 21.1 0 37.8 -1.857318083 54.4 -3.276...

6 years ago | 2

| accepted

Answered
Find multiple values closest to zero
So, you are telling us that you know how to use a fragment like ind = find(diff(sign(values)))+1 ind = 14 24 27 ...

6 years ago | 0

| accepted

Answered
ASSISTANCE ON RUNNING RANDOM VARIABLES IN A FUNCTION
Note that a random variable is a well defined term in mathematics and statistics, though much of the time when I see someone use...

6 years ago | 0

Answered
How to determine eigenvalues of symbolic matrix?
What form would you expect? Is there a reason why you expect the eigenvalues of a 4x4 symbolic matrix to be some nice pretty thi...

6 years ago | 0

Answered
fminunc gets first-order optimality of zero on iteration 0, does not find optimum
First, this appears to be a ONE parameter optimization. Do not use fminunc for that. Instead, us fminbnd. It will be more robust...

6 years ago | 0

Answered
symbolic toolbox problem ?
A strong possibility is you have overwritten/overloaded the stored value of pi. >> clear pi >> pi ans = 3.1415926...

6 years ago | 0

Answered
Find whether there is a trend over time or the data is completely random
This really is not a MATLAB question, as you have no idea how to compute what you want, and your question is too vague to have a...

6 years ago | 0

Answered
Weighted Least Square Fit regarding equal parts of the xaxis
You can't directly supply weights as an option to laqcurvefit. Better is to use lsqnonlin for this, since you return the residu...

6 years ago | 0

| accepted

Answered
Given that A is a sparse matrix, norm(A(i,:)) takes a very long time. Why and can one do better ?
You really don't want to use loops to do something like this. >> A = sprand(10000,10000,0.001); >> timeit(@() norm(A(1,:)))...

6 years ago | 0

| accepted

Answered
C = union( A,B ) is too slow. Is there any faster way given that A and B are ordered.
You could use unique. It would produce the same result, except that it will not be faster. A = sort(randi(1e7,1,1e6)); B = sor...

6 years ago | 0

Answered
Kindly help me to obtain the first four numerical solution of given trancedental equation "luck 1"
Have you not tried plotting it? It is so easy to say that you want the "first" 4 roots. >> vpa(subs(luck1,x,eps)) ans = -1.7...

6 years ago | 0

Answered
How to generate random numbers with constraints and different boundaries (for a high dimension)?
Neither of the choices on the FEX are directly a solution. randfixedsum fails because it explicitly assumes uniform bounds on th...

6 years ago | 0

| accepted

Answered
finding roots of equation in matlab
In general the roots of a 6th degree polynomial with unknown coefficients cannot be found in an algebraic form. At least not unl...

6 years ago | 1

Answered
Estimating parameter uncertainty with fminsearch
I think I am starting to understand what you are askng. One very good option is to use abs. I've been told I could use better ab...

6 years ago | 0

| accepted

Answered
How can i randomly insert 14 1's in a array of two thousand zeros?
A = zeros(1,2000); A(randperm(2000,14)) = 1;

6 years ago | 2

| accepted

Answered
How to solve this ode problem
Use none of them. This is NOT an ODE problem, except that you seemed to want to write it as such. It is certainly not something ...

6 years ago | 0

| accepted

Load more