help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LSODE Question - External Inputs?


From: Juan Pablo Carbajal
Subject: Re: LSODE Question - External Inputs?
Date: Fri, 24 Feb 2012 17:57:04 +0100

On Fri, Feb 24, 2012 at 3:43 PM, damian.harty
<address@hidden> wrote:
> Hmm, I'm becoming baffled with the included code not being there thing. I
> just pasted it in as plain text last time, and I could see it in my e-mail
> and from inside Nabble...
>
> Anyway, I think you are understanding what I'm trying to do and I get the
> non-constant calling interval with lsode.
>
> In principle I thought it wouldn't be any bother to get my function to
> return more than one variable but what with the anonymous function and
> ISTAGE and MSG variables I can't really work out what the syntax is to
> actually achieve it.
>
> Inside the file EqMotion.m I have
>
> function [xdot, ISTATE, MSG] = EqMotion (x,t,m,k,c,u,udot,t_vector)
>  ...
>  Fx=k*(u_now-x(1))+preload
>  ...
> endfunction
>
> If I add xdot(3)=Fk into it then lsode protests about a dimensional
> mismatch.
>
> And inside one_dof.m I have
>
> [x, ISTATE,MSG] = lsode (@ (x,t) EqMotion ((x,t,m,k,c,u,udot,t_vector), x0,
> t);
>
> So how do I modify the function definition and call to pass back Fk? I want
> to put it on the left hand side but lsode protests again...
>
> Thanks in advance,
>
> Damian
>
>
> And
>
> -----
> Senior Research Fellow - Vehicle & System Dynamics
> Coventry University
> United Kingdom
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/LSODE-Question-External-Inputs-tp4414228p4417389.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

Hi,

I suggest once more that you take a look at nloscillator form the
mechanics package. You will not loose anything by looking and you may
find solutions that my give other ideas. As always, however Olaf gave
an excellent answer.

Regarding sharing code. You could use the not-yet-official platform to
share code.
http://agora.panocha.org.mx/

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]