Feeds
提问
How to plot Euler's method and ODE45 against eachother?
N0=5 %Euler method r=10 tmax=10 dt=0.1 [T,N]=expgrowthEULER(N0,tmax,dt,r) a=[T,N] tspan=[0,10] %numerical integration Y0=...
7 years 前 | 1 个回答 | 0
1
个回答提问
How to write a function to calculate ODE?
Write a function which for a given value of the time, current population and growth rate returns the value of the derivative fo...
7 years 前 | 2 个回答 | 0
2
个回答提问
Why doesn't my code for Euler's method work?
function [T,N] = expgrowthEULER(N0,tmax,dt,r); T=[0:dt:tmax] N=zeros(length(T),1) N(1)=N0 for i=2:length(T) N(i)=N(i-1)...
7 years 前 | 1 个回答 | 0
1
个回答提问
Correct indexing in a for loop - my array fills gradually?
I have a sequence from 1 to 100 in increments of 2. I am trying to write a for loop to multiply all even numbers by 3 and square...
7 years 前 | 1 个回答 | 0