[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to bind a function argument
From: |
Gregor Beck |
Subject: |
How to bind a function argument |
Date: |
Tue, 13 Jun 2006 11:17:23 +0200 |
User-agent: |
KMail/1.8.2 |
Hi,
I try to bind a function argument e.g.
fun1 = @(x) fun2(x,a)
This seams to work with matlab but fails with octave up to version 2.9.5
The only way I found to achieve something similar is to use a global variable:
global very_long_and_ugly_name_for_a;
function y = fun1(x)
global very_long_and_ugly_name_for_a;
y = fun2(x, very_long_and_ugly_name_for_a);
end
Is there another way to do this?
Is it possible to expand the scope of a variable to anonymous or nested
functions to avoid the global?
thanks,
Gregor
- How to bind a function argument,
Gregor Beck <=