help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Blkproc and inline function


From: Ben Abbott
Subject: Re: Blkproc and inline function
Date: Sun, 23 Mar 2008 17:12:53 -0400


On Mar 23, 2008, at 2:18 PM, address@hidden wrote:
Hi,
It's my first fight with Octave (after SciLab) and I've some trouble
with using blkproc function.
When I pass function inline, like this blkproc(image, [16 16],
'P1*x*P2', T, T') I've got error like this:
"error: feval: the symbol `P1*x*P2' is not valid as a function".

T, T' - arrays (P1, P2 parameters just like in Matlab).

Is there any trick to pass this (P1*x*P2) function to blkproc without
error?
Thx.

--
Pawel

P1*x*P2 is not a function.

I haven't used image(), but if I infer correclty, you'll need to first create your function

function y = yourfunction (x, P1, P2)
  y = P1*x*P2;
endfunction

It should be saved as yourfunction.m

Then call

blkproc(imag, [16, 16], @yourfunction, T, T')

I may not have everything exactly correct, but @yourfunction is a handle to "yourfuntion".

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]