[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem using quad function
From: |
trinka |
Subject: |
problem using quad function |
Date: |
Fri, 10 Jun 2011 14:53:33 -0700 (PDT) |
Hello,
I am an unexpert Octave user, so sorry if my post may look naive.
I am trying to integrate a quite complex function but I will give you a
simplified example:
http://octave.1599824.n4.nabble.com/file/n3589475/formula.png
Where H is the Heaviside step function.
I have prepared this script:
….
function y = heaviside (x)
y =ceil(sign(x)/2);
endfunction
L=2;
V(1)=10;
V(2)=20;
….
qtot=0.
for j=1:nlayer,
function y = fun (x)
y =heaviside(x-V(j));
endfunction
q=quad("fun",0,L)
qtot=q+qtot;
end
but I get the following error message “’V’ undefined near line 20’.
Do you have any hint?
--
View this message in context:
http://octave.1599824.n4.nabble.com/problem-using-quad-function-tp3589475p3589475.html
Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- problem using quad function,
trinka <=