ODE Modelling in Matlab

139 Views Asked by At

I need to model human hairs in Matlab by solving ODEs, but I'm struggling to understand what to do. Here is all of the provided information:

enter image description here

I've been asked to write a function returning the $(x,y,z)$ coordinates of the hairs given $L$, $R$, $f_x$ and a list of values for $\theta(L)$ and $\phi(L)$. I'm just not sure what sure what this $(x,y,z)$ coordinate is for because I can't see how one coordinate can help me - is it a set of coordinates which would plot each hair?

I feel like I'm missing something here and would really appreciate a few pointers because I just don't know where to start. Thanks in advance.

1

There are 1 best solutions below

1
On

You have differential equation $(4)$ with a boundary conditions $(5)$. One of them is a parameter $\theta (L)$ you get as an input. Actually you get a list of them, so each one is per different hair.

type doc ode45 in matlab to get help on a function that can solve such equation(read the documentation there is a list of such functions).

Once you solved $(5)$ you use the solutions to solve 3 differential equations $(6)$ with the initial conditions given by the formulas $(1),(2),(3)$. Note that you have to solve $(6)$ one per given $\theta (L)$. The solutions of equations $(6)$ are $(x,y,z)$ is what you looking for.

Note, $\phi$ is a constant as it stated after equation $(3)$, so $\phi(s)=\phi(L)$.