|
From: | Brett Green |
Subject: | Re: Code question |
Date: | Mon, 27 Apr 2020 19:51:50 -0400 |
I tried running this. One error is the linefi = 20.*2.717.^(B.-D).*T(i));which has an extra right parenthesis. It should be replaced withfi = 20.*2.717.^(B.-D).*T(i);In the block of code%% solving euler Ex
for i=1:N
A=(I0./3.14).*exp((-a).*(Y(i)).*(((b.*cos(m)).+((r.^2).-((b.^2).*(sin(m)).^2)).^0.5)))
I(i+1) = I(i).+(h.*A);
endyou are using the variable Y before you define it. You need to define Y first before you can do any calculation with it.Are these the errors you've had so far?
[Prev in Thread] | Current Thread | [Next in Thread] |