JoelSjogren icon

Untitled

JoelSjogren | PRO | 03/23/17 07:03:02 PM UTC | 0 ⭐ | 7531 👁️ | Never ⏰ | []
Octave |

330 B

|

None

|

0 👍

/

0 👎

pkg load odepkg % needed in octave but not in matlab
 
% example input function f and domain [xmin, xmax]x[ymin, ymax]
f = @(x, y) x+y.*y;
xmin = 0, xmax = 2, ymin = 1, ymax = 2;
 
% integrated over x
F = @(y) ode45(@(t, x) f(x, y), [xmin, xmax], 0);
clf
for y=ymin:0.1:ymax
  [t, I] = F(y);
  disp(I')
  plot(t, I), hold on
end

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎