21 views (last 30 days)
I have a problem which I will try to describe in details. Please try to help me, because the exam is coming :) The task is to find the solution of the differential equation as follows:
So I have the integral function implemented into the diff equation, where the integration is not by t-time but some different parameter in this case z-height.
I know, I am not so experienced programmer and MATLAB user but please give me some advice how to write the script. If you need some more info about the nature of that mysterious functions ask me.
Roger Stafford on 27 Jun 2016
You should solve this using one of the ‘ode’ numerical differential equation functions for a second order equation in the ordinary way, with the exception that the function P(t) must be computed using matlab’s ‘integral’ function, which in turn uses the ‘fun’ function as its integrand. That means it will probably take a considerably longer time for execution because of the repeated full integration times. (I assume you know the limits of integration in P.)
You will of course have to furnish the ‘ode’ function the initial values of v and dv/dt at the initial value of t.