From: Priya Narayanan on 16 Dec 2006 15:13 We're trying to solve DAE's using matlab. As a test case we tried solving a simple DAE(code attached) that is part of Maple's solved example. However, matlab gave an error "This DAE appears to be of index greater than 1." I'm interested in finding out if higher index DAE's can be solved using matlab. Any suggestion/help will be appreciated. Thanx -Priya function dae_test M = [1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0]; y0 = [0;1/10;-1;0;4.905]; tspan = [0 10]; options = odeset('Mass',M,'RelTol',1e-4,'AbsTol',[1e-6 1e-10 1e-6 1e-6 1e-6], ... 'Vectorized','on'); [t,y] = ode15s(@f,tspan,y0,options); % ---------------------------------------------------------------------- ---- function out = f(t,y) out = [y(2,:) -2*y(5,:).*y(1,:) y(4,:) -9.8-(2*y(3,:).*y(5,:)) -y(1,:).^2-y(3,:).^2+1];
|
Pages: 1 Prev: Power flow Optimization with PSO Next: matlab.exe proces |