Fourth order nonlinear DE solution where forcing function interpolation is known

I want to solve the differential equation: , with BCs: (constant).
The function is not explicitly known, but I know its interpolation. I tried fitting a polynomial/exponential, but it I do not get a satisfactory fit. Please help!

댓글 수: 3

I tried fitting a polynomial/exponential, but it I do not get a satisfactory fit.
What do you need help for ? Fitting f ? Solving the differential equation ? Show what you have done so far.
I just need help with how to use ode45 when I do not know the explicit nonlinear function, but its interpolation. I am sure I can break down the 4th derivative into 4 first order DE's but not sure about what syntax to use for the interpolation.
Sorry. My approach does not apply to a nonlinear forcing term that is a function of the dependednt variable.

댓글을 달려면 로그인하십시오.

 채택된 답변

Torsten
Torsten 2023년 5월 21일
편집: Torsten 2023년 5월 21일
You will have to use bvp4c, not ode45.
And interpolation in the function where you define the derivative function can be done via
fw_inter = interp1(w,fw,y(1))
where w and fw are your data vectors (w ordered) and y(1) is the value of w from bvp4c:
function dydx = bvpfcn(x,y,w,fw)
fw_inter = interp1(w,fw,y(1));
dydx = [y(2);y(3);y(4);fw_inter];
end

추가 답변 (0개)

카테고리

제품

릴리스

R2023a

태그

질문:

2023년 5월 21일

댓글:

2023년 5월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by