photo

Hossein


Attivo dal 2011

Followers: 0   Following: 0

Messaggio

Hi,

I am using odeXXX for solving a simple ordinary equation. I need to have the solution in different times. For doing so, I though I only need a time span like
timespan=linspace(0,45E-6,88)
but the number of outputs does not have any correlation with the size of timespan

timespan=linspace(0,45E-6,88);
sol=ode45(handle,timespan,y0)

so I am expecting to see 88 answer in the output, but depending on the 'RelTol' the number of output is something about 24 to 290

right now I am using a for loop like this,

for i=1:size(timespan)
sol=ode45(handle, [0 timespan(i)],y0)
y=sol.y(:,end)
end

I am sure there must be a much better and faster way to obtain these results.

Statistica

MATLAB Answers

1 Domanda
4 Risposte

RANK
3.690
of 300.381

REPUTAZIONE
14

CONTRIBUTI
1 Domanda
4 Risposte

ACCETTAZIONE DELLE RISPOSTE
0.0%

VOTI RICEVUTI
1

RANK
 of 20.941

REPUTAZIONE
N/A

VALUTAZIONE MEDIA
0.00

CONTRIBUTI
0 File

DOWNLOAD
0

ALL TIME DOWNLOAD
0

RANK

of 168.477

CONTRIBUTI
0 Problemi
0 Soluzioni

PUNTEGGIO
0

NUMERO DI BADGE
0

CONTRIBUTI
0 Post

CONTRIBUTI
0 Pubblico Canali

VALUTAZIONE MEDIA

CONTRIBUTI
0 Punti principali

NUMERO MEDIO DI LIKE

  • Knowledgeable Level 1
  • First Answer

Visualizza badge

Feeds

Visto da
Nessuna attività