[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ode45 issue: dimension mismatch
From: |
Tweety |
Subject: |
Re: ode45 issue: dimension mismatch |
Date: |
Wed, 7 Feb 2018 08:22:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Hello, sorry for the confusion. Yes, what I meant was
dx/dt = M*(x^m)*(1-x)^n
>From my original post it became clear that M, m and n are constants.
When I let octave run on below code, I now get
warning: dx: some elements of return values are undefined.
error: ode45 [...] dimension mismatch
Still do not understand, t has been defined globally and in my thinking
x is supposed to be the outcome of ode45? If I define x = zeros(101,1)
within the function as seen in some examples on the internet, I get a
message on nonconformant arguments (op1 is 101x1, op2 is 101,1).
The dimensions of which variables must match?
Thanks,
Jan
clear; clc;
t = linspace(0,400,101);
x0 = [0, 0];
function f = dx(x,t)
M = 2.933e-5;
m = 0.158;
n = 1.26;
dx = M*(x.^m)*(1-x).^n;
endfunction
[t,x] = ode45(@dx, t, x0);
Am 07.02.2018 um 06:15 schrieb Svetlana Tkachenko:
> I am having difficulty parsing `dx = M*x^m(1-x)^n;`. What does it mean? I'd
> add more brackets for clarity.
>
- ode45 issue: dimension mismatch, Tweety, 2018/02/06
- Re: ode45 issue: dimension mismatch, Carlo De Falco, 2018/02/06
- Re: ode45 issue: dimension mismatch, Tweety, 2018/02/06
- Re: ode45 issue: dimension mismatch, Sergei Steshenko, 2018/02/06
- Re: ode45 issue: dimension mismatch, Svetlana Tkachenko, 2018/02/07
- Re: ode45 issue: dimension mismatch, Thomas D. Dean, 2018/02/07
- Re: ode45 issue: dimension mismatch,
Tweety <=
- Re: ode45 issue: dimension mismatch, Sebastian Schöps, 2018/02/07
- Re: ode45 issue: dimension mismatch, Carlo De Falco, 2018/02/07
- Re: ode45 issue: dimension mismatch, gciriani, 2018/02/07