Answered
How small is Zero?
It is easy for that to happen. Of course, you don't actually tell us WHAT test you did. But this just means you have an event ou...

3 years ago | 1

| accepted

Answered
Lagrange multipliers in constrained nonlinear optimization
Let me give a simple example, showing why solve is a poor tool for such a problem. minimize x^2 + y^2 + z^2 subject to x...

3 years ago | 0

Answered
Solving a system of second order ODE backwards
Easy, peasy. For example, solve the ODE y' = sin(t) subject to the initial condition, that at t==1 we have y(1)=1/2. Now ...

3 years ago | 1

| accepted

Answered
Interpolated points to be at a certain equal angular distance
Simple. Without even looking at the plots, first... The curve is not closed. You are clearly using code I wrote, but now fittin...

3 years ago | 0

Answered
Hermite polynomial method, incorrect coefficients
I could swear I answered this question only recently. Maybe not for you, and I don't feel like a search through the many thousan...

3 years ago | 0

Submitted


randpoly
Generate N uniformly distributed points inside a supplied polygon (or polyshape)

3 years ago | 2 downloads |

0.0 / 5
Thumbnail

Submitted


allcrossings
Locate all intersections of a pair of functions f1 and f2, on a finite domain

3 years ago | 1 download |

0.0 / 5

Answered
How to randomly generate point cloud in irregular range?
It is not at all clear what you are looking to do from your question. But I believe you are asking how, given a 2-dimensional ar...

3 years ago | 1

| accepted

Answered
RMSE - Root mean square Error
UPDATE: Starting in R2022b, you can now calculate Root Mean Square Error using the built in MATLAB function ‘rmse’: https://www....

3 years ago | 24

| accepted

Answered
Where should I add a continue command to skip prime numbers less than 10?
This does not work? I'm surprised. ;-) Did you want to count those primes too? You do not say. For example, this will not count...

3 years ago | 0

Answered
How to generate a diagram illustrating the relationship between several nested functions?
You are asking for what is essentially a high level flow chart, produced automatically from existing MATLAB code, that shows how...

3 years ago | 0

Answered
dsolve: Number of equations greater than number of indeterminates. Trying heuristics to reduce to square system.
Is ode1 a differential equation? (NO. ode1 is an algebraic relationship between the variables.) For example, conside this simple...

3 years ago | 0

| accepted

Answered
How to find (interpolated) zeros in a data array
There is no assurance that interp2 and contourc are using identically the same scheme for interpolation. Even in the case of "li...

3 years ago | 0

Answered
Getting equation for a interpolated spline using csaps
I'll post this as a separate answer, since I did not use a spline at all to build the model, and so it does not get lost in the ...

3 years ago | 0

| accepted

Answered
The MATLAB function to solve implicit equation
Assuming your question is how to solve the equation [m^2 /( 3(a+a0)^2)] * (2 * k1 + 3 * k2) = a0 * (2/v1 + 5/v2) I removed...

3 years ago | 0

Answered
Getting equation for a interpolated spline using csaps
Can you get the spline equation? No. There is no simple equation you can write down. Or, if you could write it down, it would in...

3 years ago | 0

Answered
how to filter the noise of a signal
This is probably a good task for a median filter. load matlab.mat whos plot(F) Fhat = medfilt1(F,100); plot(Fhat) Larger v...

3 years ago | 0

Answered
Finding all the positive Roots of non linear equation and plotting the modes
Of course, this would have been for homework, so there is not really much point to posting this answer. Oh well. I will anyway, ...

3 years ago | 0

Answered
contour for scatter data
Let me give an example of how to use a tricontouring tool for scattered data. x = rand(100,1); y = rand(100,1); zfun = @(x,...

3 years ago | 0

Answered
Unable to use 'fit' function from Curve Fitting Toolbox
Is fit giving you fits? First, check that MATLAB thinks the curvefitting toolbox is installed, and that you have a license for ...

3 years ago | 0

| accepted

Answered
Generating a distribution of points relative to closed surface (alphshape)
Ok. I''ll offer a couple of solutions. Recognize that nothing will be perfect, since these are ad hoc solutions, and an alpha sh...

3 years ago | 0

| accepted

Answered
help me fix the Error
which distance_to_earthcos -all This function is not a MATLAB function. It is not found in any toolbox either. For that matter,...

3 years ago | 0

Answered
Problem with derivative function
What you don't seem to appreciate is that in the eyes of the symbolic toolbox, something like 2^(-1/2) Is a numerical result. So...

3 years ago | 0

| accepted

Answered
Planes and vectors in 3d
Are these vectors with a tail at (0,0,0)? If so, then they must cross the plane, as long as the z-component is not zero. Or are ...

3 years ago | 0

| accepted

Answered
How to fit multiple gaussian in a curve ?
Easy enough. You NEED good starting values though. Crappy starting values --> crappy results. load dsp.mat plot(f,pxx) grid o...

3 years ago | 0

| accepted

Answered
replace the values by nearest mean of the matrix
Using my inpaint_nans.... y = randi(10,[7,7]) - 2 y = 0 5 0 8 1 0 2 6 5 7 -1 ...

3 years ago | 0

Answered
Going back to unvisited node through visited node by minimum weight of edge
Why are you not using the existing graph tools to solve graph problems? It is never a good idea to write your own code to solve ...

3 years ago | 0

| accepted

Answered
my objective function should return less than 10^-6.
First, suppose your car had a problem. Would you take a picture of your car and send it to your local auto mechanic? Would they ...

3 years ago | 0

Answered
plot a matrix in 3D
DID YOU TRY IT? Why not? So, given some arbitrary complex matrix, how do you compute the magnitude? ABS does that. How you you ...

3 years ago | 0

Answered
Trapezoidal numerical integration of f(y) = ( 1 / x(y) ) dy
You are confusing yourself here. Probably because you have created this variable x that has gotten you confused. But let me give...

3 years ago | 1

| accepted

Load more