Answered
Finding cube with most Values
Why would you expect there exists built-in code to do something totally unusual like this? Built-in code is written to solve com...

7 years ago | 0

Answered
Fitting Gamma to a curve with two peaks
This is a mistake that many people make. They know how to fit a model to a curve. But the model they know how to use does not ...

7 years ago | 1

Answered
Determining values in array (of 1s and 0s) that neighbour similar values
As an alternative to a tool like imerode, you can just use conv2. The minor virtue is that conv2 lives in MATLAB proper, with no...

7 years ago | 0

| accepted

Answered
How to calculate of average numbers every n rows?
Pretty easy. What you need to learn is how MATLAB stores numbers in an array, how to reshape things so that you get what you wan...

7 years ago | 6

| accepted

Answered
Deleted surf script on system
Sorry, but we cannot send you a copy of code. However, you can just download a new copy of MATLAB. Go to the support page. htt...

7 years ago | 0

Answered
hook for an optimization problem.
That is a bad idea. You want to adjust your objective function in an optimization, based on iteration count, or some other info...

7 years ago | 0

| accepted

Answered
Fibonacci sequence up to first 256 elements
While this is surely homework, you got it almost correct, with a few major errors. Preallocate the vector!!!!!!!!!!!!!! Never ...

7 years ago | 0

| accepted

Answered
How to work rdivide function
Please don't post answers to questions as you did to another question when you just want to ask a question. Regardless, it look...

7 years ago | 2

| accepted

Answered
How to perform piece-wise linear regression to determine break point?
The simple way? Use a tool that can solve the problem. Don't write code to do work when you don't understand the fundamentals be...

7 years ago | 1

Answered
Finding standard errors in curve fitting tool
In real research, maybe YOU always show it that way. That is not true for everybody. Standard for you is not necessarily standar...

7 years ago | 0

Answered
How to do exponential curve fitting in the form of y=a*exp(-b*x)+ a constant
Sigh. You give us x as: x = 1:119; Then a vector y, of length 132. Since x was so simply created, I'll assume it is just 1:32...

7 years ago | 0

Answered
problem with fsolve optimization error message
You seem to misunderstand how things work. You have provided ONE unknown to solve for. However, there are TWO equations that ...

7 years ago | 0

Answered
Find combinations of two variables in functions which must equal certain value
Algebra? If we have q = 9 = sqrt(z1*z2) then it is trivial. z1*z2 = 9^2 So the curve is given as z2 = 81/z1 Plott...

7 years ago | 0

| accepted

Answered
Solving for a matrix
You have what? 2 unknowns? I've seen various versions of these equations that you have written. But you do not have 16 unknowns....

7 years ago | 0

Answered
fminsearch: improving optimization of parameters over wide scale of y values
This is not a question of the optimizer you use. It is a question of scale, and your objective function. ANY optimizer will fail...

7 years ago | 1

| accepted

Answered
Solve with absolute value
Once you introduce that absolute value into the problem, you make it sufficiently nonlinear that no analytical solution can exis...

7 years ago | 2

| accepted

Answered
Extrapolation of irregular sampled data
Um, lets be serious. You want to extrapolate that mess? plot(DTN,WRL,'o') grid on Seriously? Exactly what would you draw fo...

7 years ago | 1

Answered
Generate random numbers from a mixture distribution
Read David's answer. But let me explain it like this, because I think many people do not understand what a mixture distribution ...

7 years ago | 2

| accepted

Answered
Numerical Method to solve single function with multiple variables
What you do not understand is why it fails, and why a numerical method there has to fail. The simplest way to understand this is...

7 years ago | 0

Answered
Trouble using pchip to interpolate
This is a common problem in interpolation using splines. So long ago, I wrote a utility to solve it for you. It has been on the ...

7 years ago | 1

Answered
Problem of Nonlinear Regression
I'm not terribly sure why you want to fit that choice of model, especilly if it does not fit. First, with t as time, and T as t...

7 years ago | 0

Answered
is there a built in function to find inflection points of an array of data?
No. I'm not sure why there should be, as it is something that few people seem to have asked to do, and there are several ways to...

7 years ago | 0

| accepted

Answered
Faster numerical integration for vector functions
First, why does integral2 not allow arrayvalued integration? I can only conjecture, but I think this is reasonable - integral2 i...

7 years ago | 0

| accepted

Answered
Finding the lowest cost for moving from right to left in a matrix
This is a fairly classic problem, posed for homework, etc. (In fact, it is the basis for at least one Project Euler problem, eas...

7 years ago | 0

Answered
How to generate a 4 D plot.
You want to plot some function of 4 variables. So essentially, you have a 5-dimensional plot you want to see. Not gonna happen. ...

7 years ago | 0

Answered
Fitting a Bimodal pore size distribution does not give the expected results, how to solve for correct solution?
Almost always, when an optimization like this fails, the problem arises from one of several circumstances. Sadly, it is impossib...

7 years ago | 0

| accepted

Answered
Fixed point(equilibrium points)
Why would you use an ODE solver to determine equilibrium points for an ODE? Yes, I know it somehow seems logical. But this is no...

7 years ago | 0

| accepted

Answered
Curve Fitting for Artificial Topography
I have no idea what you are asking for here. Note that my gridfit tool has an example where I took scattered data from a hillsid...

7 years ago | 0

Answered
convex hull in 3D binary matrix
It is easy enough to do, although I will suggest that a convex hull is often a bad idea when applied to color data. AN alpha sha...

7 years ago | 0

| accepted

Answered
Why does r have these many number of exact elements?
Here is your code. r = []; a = 0; n = 3; while a<15 a = rank(magic(n)); r(n) = a; n=n+1; end I initialized a as 0...

7 years ago | 3

| accepted

Load more