# Matthew Hunt

**Statistics**

RANK**26,646**

of 244,620

REPUTATION**1**

CONTRIBUTIONS

**24** Questions

**6** Answers

ANSWER ACCEPTANCE **
25.0%
**

VOTES RECEIVED**1**

RANK

of 17,085

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Question

I want to do a 1D integral of some 2D data

Suppose I have a function which is defined as some numerical data which is equally spaced and I wish to compute: How would I...

2 months ago | 2 answers | 0

### 2

answersQuestion

Speeding up pdepe calculation

I have a pdepe bit of code I want to speed up if I can. I have a (typically) 400x800 array as a source term, the code I'm curren...

1 year ago | 0 answers | 0

### 0

answersQuestion

Importing a two variable function into pdepe

Hi I want to solve a diffustion pde I understand how to do this if Q is a single variable function using interp1, but I do...

1 year ago | 1 answer | 0

### 1

answerQuestion

Empirical source terms with PDEPE

Suppose I'm solving an equation: ...

1 year ago | 1 answer | 0

### 1

answerQuestion

How do I include a user specified hessian function for fmincon?

I am working on an optimisation code and I have a Hessian function I wish fmincon to use. I'm currently having trouble trying to...

1 year ago | 1 answer | 0

### 1

answerIs it possible to store the intermediate values of fmincon?

So I had to do a lot of searching and turns out that this is possible without downloading code. The key was to use 'OutputFcn' i...

1 year ago | 0

| accepted

Question

Is it possible to store the intermediate values of fmincon?

If I'm runnning fmincon, and I want to see the values of the parameters at each iteration, is there a way to do this? The docum...

1 year ago | 5 answers | 0

### 5

answersQuestion

Defining a stopping criterion for fmincon

I am looking at an optimisation problem with the following objective function: ...

1 year ago | 1 answer | 0

### 1

answerQuestion

Objective function doesn't converge but jumps around

I have been trying to complete an optimisation problem. I am looking at radial heat diffusion on a cylinder. I want to tackle it...

1 year ago | 0 answers | 0

### 0

answersQuestion

Crank Nicholson method for cylindrical co-ordinates

I am trying to solve the heat equation in cylindrical co-ordinates using the Crank-Nicholson method, the basic equation along wi...

2 years ago | 0 answers | 0

### 0

answersQuestion

Converting anonymous function to a matrix

I have a function of the form: , which I want to evaluate. I could do this old school with a double loop but that would take t...

2 years ago | 1 answer | 0

### 1

answerQuestion

Diagonal matrices with spdiags

I'm working on a numerical solution to an equation and as part of this I have to solve a matrix solution. The system of equation...

2 years ago | 1 answer | 0

### 1

answerQuestion

Is there a way of removing these for loops to speed up my code?

I have the analytical solution to the following PDE: with boundary condition and and initial condition in the form of a Gr...

2 years ago | 1 answer | 0

### 1

answerQuestion

I have: Error using bsxfun Non-singleton dimensions of the two input arrays must match each other.

So I have some code which I want to get working and I don't understand the error which is being given to me which is: Error usin...

2 years ago | 2 answers | 0

### 2

answersQuestion

Interp1 returns NaN for a value

I have some data (x,f(x)) where 0<=x<=1 and I have N points. I wish to obtain f for an inteverval [a,b] which is well within the...

2 years ago | 1 answer | 1

### 1

answerQuestion

Tracking the size of a variable

Hi, I have a vector of length 200. When I run my program it somehow halfs in length, and I have no idea why. Is there a way of ...

2 years ago | 1 answer | 0

### 1

answerNot enough input arguments when doing global optinisation

I've seen what I need to do. The set up of the function is different to lsqcurvefit: I had to define the function as: fun = ...

2 years ago | 0

Question

Not enough input arguments when doing global optinisation

I am trying to use the global optimisation toolbox to find some parameters which will make a computed curve overlay some experim...

2 years ago | 1 answer | 0

### 1

answerQuestion

lsqcurvefit doesn't curve fit

I have a model which I want to paramtrise using lsqcurvefit. I have 10 parameters that I must find and I have 10 pieces of data ...

2 years ago | 2 answers | 0

### 2

answersQuestion

Error using lsqcurvefit (line 262) Function value and YDATA sizes are not equal.

I am using the following code: %Import data as time and voltage: load VoltageData.mat; load('OCP_Cathode.mat'); %Load the O...

2 years ago | 1 answer | 0

### 1

answerQuestion

Finding the multiple zeros within a prescribed interval

I wish to solve the nonlinar function: =0 within a prescribed interval, say (0,100] say, I'm aware of usi...

3 years ago | 1 answer | 0

### 1

answerQuestion

Optimisation of parameters in a PDE

Hi, Suppose I am dealing with the heat equation: ∂T/∂t=α∂^2T/∂x^2 and I have some data which I want to fit it to and determ...

3 years ago | 1 answer | 0

### 1

answerQuestion

Solution diverges for 1D heat equation using Crank-Nicholson

I am trying to solve the 1D heat equation using the Crank-Nicholson method. I have managed to code up the method but my solution...

3 years ago | 1 answer | 0

### 1

answerSystem of PDEs which is tricky for PDEPE

I have some values which allow the code to run BUT I have oscillations in the diffusion which I should not get. I am assuming th...

3 years ago | 0

Variable density in heat diffusion equation

So I used the following code: function [CC, FF, SS]=battery_GE(x,t,u,DuDx) global rho; global c_th; global a_1;globa...

3 years ago | 0

Variable density in heat diffusion equation

So I do the interp1 trick you demonstrated before?

3 years ago | 0

Question

Variable density in heat diffusion equation

Suppose I have a heat diffusion equation: rho(x)*c(x)*dT/dt=d/dx(k(x)*dT/dx) Where rho(x) is the density, c(x) is the heat...

3 years ago | 2 answers | 0

### 2

answersQuestion

Problems with pdepe and input variables

I have played around with my code and have the following code for pdepe which looks as if it should work: function battery_...

3 years ago | 0 answers | 0

### 0

answersSystem of PDEs which is tricky for PDEPE

So I managed a work around to get pdepe to work with my system and the code I'm using is: %This is the simplistic model of ...

3 years ago | 0

Question

System of PDEs which is tricky for PDEPE

I have a system of PDEs, mainly diffusion equations of the form: T_t-(k(x)(T_x)_x=a*E^2 c_t-(D(x)*c_x)_x=d*(E_x+c_x-T_x) ...

3 years ago | 5 answers | 0