[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lsode twice problem
From: |
marciopfrs |
Subject: |
lsode twice problem |
Date: |
Fri, 17 Jan 2014 12:17:47 -0800 (PST) |
Hello,
I'm using the following commands to solve the ODE:
% y''(t) = (y'(t))^2/2 - 2y +2
% y(0) = 1?
% y'(0) = 0?
% using the system
% Y(1) = v'= v^2/2 - 2y +2
% Y(2) = y' = v
% X(1) = v
% X(2) = y
function Y=f(X,t); Y=[X(1)*X(1)/2 - 2*X(2) + 2, X(1)]'; endfunction;
X0 = [.7, .845]';
t = linspace(0, 20, 91);
X = lsode('f', X0, t);
% plot(t, X(:,1), t, X(:,2))
% plot(t, X(:,2))
I tried a lot but was not able to use the solution "y" of this ODE in
another ODE
%w'=y*w +1.
How can I do this?
--
View this message in context:
http://octave.1599824.n4.nabble.com/lsode-twice-problem-tp4661149.html
Sent from the Octave - General mailing list archive at Nabble.com.
- lsode twice problem,
marciopfrs <=