cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Odesolve (?) error

JohnRudnicki
14-Alexandrite

Odesolve (?) error

I am using Odesolve to solve a system of ODE's with a boxcar forcing function that starts at 1 goes to 10 and and I would like to return to 1. If I set the return value at 1.5, everything is fine. I I reduce it to, say, 1.2 I get the (to me, cryptic) error "The return value of this function must match the problem size."  (see attached worksheet). Can someone help me out.

7 REPLIES 7

Right-click on Odesolve and choose, say Adams/BDF (or anything other than Radau) and it works ok with llim = 1 

(also, perhaps vhat(t):=1+9*(phi(t-1)-phi(t-5)) might be a neater way of defining vhat - though this doesn't help Radau to work).

Alan

Thanks. (I think you gave me similar advice a while ago on a similar issue. My excuse: I use MathCad sporadically and my memory is not what it used to me)

John

Hi John.

Well, actually you have a bigger problem there: you plot for v(t) starts in 0, but in the solve block it is stated that v(0)=1. Same thing for U.

Best regards.

Alvaro.

Werner_E
25-Diamond I
(To:AlvaroDíaz)

> you plot for v(t) starts in 0, but in the solve block it is stated that v(0)=1.

This only looks that way in the plot because the ordinate is just showing beginning with 1. Seems to be all OK here:

> Same thing for U.

Why do you think so? The plot for U is not shown, but it starts at (0/0) as demanded:

Werner

Hi Werner.

You're right, U is OK, I confuse U with q4. But I see some problems in v even can't see where, but first place to check is the set of equations and initials conditions.

test.gif

Hi. Seems that issues are solved, this is, v(0)=1 for the plot, and works for any Ilim.

Best regards.

Alvaro.

Thanks. John

Announcements

Top Tags