help-octave
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Need help to vectorize code
From
:
t t
Subject
:
Need help to vectorize code
Date
:
Sat, 13 Apr 2013 18:40:19 +0400
Hello, everyone!
I want to avoid using "for" loop to calculate vector x.
I have the following schematic code.
Thank you for your attention
function xdot = octave2 (x, t);
Do something;
endfunction;
function xdot = octave2 (x, t);
Do something;
endfunction;
function dsi = dsigma();
Z= Matrix 100 x 100;
t = linspace(0, 100, 10000)';
x(1) = sum(sum(lsode("octave2", Z(1, 1:100), t)));
x(2) = sum(sum(lsode("octave2", Z(2, 1:100), t)));
x(3)= sum(sum(lsode("octave2", Z(3, 1:100), t)));
...
x(100)=sum(sum(lsode("octave2", Z(100, 1:100), t)));
dsi = x;
endfunction;
dsigma();
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
Need help to vectorize code
,
t t
<=
Re: Need help to vectorize code
,
PetrSt
,
2013/04/15
Prev by Date:
Need help with vectorizing the code
Next by Date:
Re: is bsxfun.cc test failure a known one for octave-3.6.4 ?
Previous by thread:
Need help with vectorizing the code
Next by thread:
Re: Need help to vectorize code
Index(es):
Date
Thread