Is it to save typing, or some other reason?
If it is just to save typing, maybe
g(t,M):= matrixmap(lambda([x],f(x,t)),M);
does what you want?
-sen
On Tue, 8 May 2007, Alasdair McAndrew wrote:
> I have a function func(x,y) of two variables, which I want to apply to a
> matrix M; keeping one of the variables (y), fixed:
>
> matrixmap(lambda([x],func(x,3)),M);
>
> does the job. But I want to be able to do this with simpler syntax, without
> using lambda, something like
>
> matrixmap(func(3),M);
>
> I know this doesn't work as written... what trick of Maxima syntax will
> produce something like that? I don't want to rewrite the function to
> exclude y, as I want to use different (but fixed over the matrix) values of
> y:
>
> matrixmap(func(5),M);
>
> for example.
>
> thanks,
> Alasdair
>
--
---------------------------------------------------------------------------
| Sheldon E. Newhouse | e-mail: sen1 at math.msu.edu |
| Mathematics Department | |
| Michigan State University | telephone: 517-355-9684 |
| E. Lansing, MI 48824-1027 USA | FAX: 517-432-1562 |
---------------------------------------------------------------------------