[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scoping issue, revisited
From: |
Eric S. Carlson |
Subject: |
scoping issue, revisited |
Date: |
Mon, 11 Dec 2006 11:24:42 -0800 (PST) |
For anyone who has programs like the following that will not run in octave
2.9.9+ because of scoping issues:
function main
f5 = @(x) g(x,4);
xzero = fzero(f5,1)
function y=g(x,a)
y=a-x.^2;
this simple mod to create a script from the program will work fine
1;
function main
f5 = @(x) g(x,4);
xzero = fzero(f5,1)
end
function y=g(x,a)
y=a-x.^2;
end
main
clear main g
This is a modification procedure that is very easy to automate. Overall, the
issue is quite important because TMW pushes this as the proper way to send
extra params to functions passed to function functions.
EC
--
View this message in context:
http://www.nabble.com/scoping-issue%2C-revisited-tf2796134.html#a7801273
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scoping issue, revisited,
Eric S. Carlson <=