f



MATLAB function name passed in a function call

I have a statement as follows:

wc = FWT_PO(x_use,4,QMF)

where QMF is the name of a MATLAB function (QMF.m, the Quadrature
Mirror Filter function). x_use is an array. The function
FWT_PO is just regular MATLAB statements.
Problem is that control immediately goes to
QMF.m whereupon it bombs out with a "not enough input arguments"
error message. Do not understand this form of function call line,
cannot find it described in the
MATLAB "Help", & thus do not understand cause of the error or how to
fix.
0
4/8/2004 6:01:11 PM
comp.soft-sys.matlab 211266 articles. 19 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
1086 Views

Similar Articles

[PageSpeed] 38

In article <eed8cdf.-1@webx.raydaftYaTP>, kbannister@ara.com says...
> I have a statement as follows:
> 
> wc = FWT_PO(x_use,4,QMF)
> 
> where QMF is the name of a MATLAB function (QMF.m, the Quadrature
> Mirror Filter function). x_use is an array. The function
> FWT_PO is just regular MATLAB statements.
> Problem is that control immediately goes to
> QMF.m whereupon it bombs out with a "not enough input arguments"
> error message. Do not understand this form of function call line,
> cannot find it described in the
> MATLAB "Help", & thus do not understand cause of the error or how to
> fix.
> 

Without knowing how FWT_PO is using the 3rd input, it's hard to say, but 
perhaps you want to pass in a function handle to QMF?  E.g.,

wc = FWT_P0(x_Use,4,@QMF)

???
Loren
0
loren.shure (834)
4/8/2004 6:26:19 PM
Are you using wavelab toolbox?  Then QMF comes from makeonfilter!
BR
Anders
"Ken Bannister" <kbannister@ara.com> skrev i meddelandet
news:eed8cdf.-1@webx.raydaftYaTP...
> I have a statement as follows:
>
> wc = FWT_PO(x_use,4,QMF)
>
> where QMF is the name of a MATLAB function (QMF.m, the Quadrature
> Mirror Filter function). x_use is an array. The function
> FWT_PO is just regular MATLAB statements.
> Problem is that control immediately goes to
> QMF.m whereupon it bombs out with a "not enough input arguments"
> error message. Do not understand this form of function call line,
> cannot find it described in the
> MATLAB "Help", & thus do not understand cause of the error or how to
> fix.


0
huanbj (458)
4/8/2004 10:20:28 PM
Reply:

Similar Artilces:

Call Matlab functions from mex (matlab function's input is string)
Here is my mex code: void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]){ char errBuff[1]={'A'}; //create mxArray pointer mxArray *mxerr; //copy errBuff to mxArray mxerr = mxCreateString(errBuff); //initialize mxArray with errBuff char array, return to pointer //call matlab function mexCallMATLAB(0,NULL, 1,mxerr, "errorCatcher"); //destroy mxArray mxDestroyArray(mxerr); //destroy mxArray printf("destroyed mex array\n"); }//end of mexFunction errorCatcher accepts string inp...

Passing a MATLAB function to a C function
Hi. I have the following setup: 1) a function of several variables implemented in MATLAB which I want to optimize, i.e. to find variable values for which the function gives minimal value, 2) a very good local optimization procedure implemented in C which I want to use repeatedly to optimize the above mentioned function, and 3) a procedure for generating the local search starting points implemented in MATLAB again. Thus, I need to run a MATLAB function which will iteratively generate a starting point and run a C-function local search procedure from that point. I must pass a function de...

how to pass a function name to a function, and have it call it
I have a subroutine which draws arcs, I call it like this: arc( $from, $to, $col, $alist, $trim, $shift, $npoints ); and it draws an arc from $from to $to, with various adornments specified by the other arguments. I have a subroutine sub add { my ( $p, $q ) = @_; my ( $x, $y ) = @$p; my ( $dx, $dy ) = @$q; return [ $x+$dx, $y+$dy ]; } which receives a point [$x,$y] and a displacement [$dx,$dy] and returns the displaced point [$x+$dx,$y+$dy]. I have a subroutine polyarc, which I call like this my $displist = [ [0,0], [$u,-$u], [-$u,$u] ]; polyarc( $d...

How to call matlab functions directly from C++ /without calling matlab engine
How to call matlab functions directly from C++ without calling matlab engine. as it is described in this tutorial: http://www.codeproject.com/samples/matlab_cpp.asp I have tried to do something similar in Visual Studio 2005 [Matlab 7, r14] #include <mclcppclass.h> .... mwArray A, B, C; A = magic(mwArray(5)); B = transpose(A); .... but it doesn't compile. I got following errors: error C3861: 'magic': identifier not found error C3861: 'transpose': identifier not found etc... I was looking for header files with declarations of this functions in matlab directory...

Call a Matlab function from Java running in matlab.
Hi guys. I really apologize for asking this question, since I'm sure it is either basic or not possible, but I have been reading through the documentation and can't seem to figure this out, since the examples look like they just send and receive variables from the Java methods. Could anyone give me a short example of how to call a method from a Java object that causes some sort of action to be performed in MATLAB? For example, I would like to: 1) make a new object of MyClass from MATLAB called MyObject. 2) run MyObject.DoSomethingInMatlab() 3) have a statement in DoSomethingInMatlab...

Calling Functions in an Embedded Matlab Function in Simulink
I have created a Simulink model to test a Kalman filter that I designed and to replicate real data input, I am using an embedded Matlab file that calls a function within this file called "myWait". I placed this function at the end of my embedded Matlab file and it does not seem to have any problems calling this function, but within this function, it makes use of predefined functions "timer", "start" and "wait". When I try to build the model I get the following errors: Undefined function or variable 'start'. Function 'Real Time States...

call to matlab function from matlab GUI stalls
I have the following problem. I have created a simple Matlab GUI (for our purposes it can just be considered a Matlab function) which gathers some parameters and then invokes a perl script that in turn calls other perl and Matlab scripts to perform various calculations. If instead of using the Matlab GUI, I run the perl command from the unix prompt, the flow runs and concludes correctly. BUT if I invoke the flow from the Matlab GUI (function), then it runs correctly by calling various other perl and Matlab scripts, but then when it reaches the third Matlab function call, it consistently stalls...

Calling Matlab functions from S-Functions in C...
Hi, I am trying to write an application in Simulink using S-Functions written in C language. I would like to know if I could call Matlab Array functions like 'var', 'median' etc from the S-Functions written in C. i.e., Is there a C interface for the Matlab functions? Any response would be appreciated. Thanks Pradeep. Pradeep wrote: > Hi, > > I am trying to write an application in Simulink using S-Functions > written in C language. I would like to know if I could call Matlab > Array functions like 'var', 'median' etc from the S-Functi...

Calling functions from functions from functions ...
Lets say I have a function g(p,x) where x and p are of some defined type. I also have a function NewtonR which I can use like so: x = NewtonR(g,p,x0) There is also another function I want to call ImplicitTrap which can be done as: u = ImplicitTrap(g,p,u0,step,n) This function defines a function of g, and it is this function that I'd like to pass to NewtonR. Can it be done? Basically the code is implementing the implicit trapezoidal rule for numerical integration with the NR solver being used at each step with automatic differentiation being used to handle the differentiation. M...

Passing function arguments to Matlab via Matlab Engine
If someone can help me here , it will be greatly appreciated ... I was able to set up the Matlab Engine Call via C properly without any issues.. , done it via a C function calll .. something like this ... : ////////////////////////////////////////////////// #include <math.h> ..... int matlab_call(double Amp) { Engine *ep; mxArray *A = NULL, *result = NULL; if (!(ep = engOpen(""))) { fprintf(stderr, "\nCan't start MATLAB engine\n"); return EXIT_FAILURE; } ... } ////////////////////////////////////////////////// Now i want to...

Passing a function name as an argument to a function that calls defadvice?
How do I pass a function as an argument to another function that then uses the argument as a function name to defadvice? Here's what I'd like to do: (defun work-around (arg-function) (defadvice arg-function (around work-around-fn activate) ... before code ... ad-do-it ... after code ... ) ) (work-around 'some-function) However, I can't seem to get some-function into the defadvice call as the function argument. 'arg-function doesn't work either. With the current version, the advice binds to arg-function, not some- function. When I change it to 'a...

How to pass a function to a function?, and how to pass the variables of the function?
I'd like to write a function like: function f(){ ... bla ...} f_example(f); function f_example($function_to_execute) {...bla... $function_to_execute() ...bla....} AND how to pass the variable of the function : function f_example($function_to_execute($var1,$var2)) {...bla... $function_to_execute() ...bla....} Thank you in advance for the time you'll spend for me, Andrea. I'm sorry, I don't quite understand what you are asking... If you are asking how to use results of a function in another function then you should do this. function test1() { return "Hello Wor...

How to fix this " Warning: Function j has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. "
I am using Matlab r2015a on windows 10. so, how to fiz this? On 03/21/2015 4:09 AM, Altin Guberi wrote: > I am using Matlab r2015a on windows 10. so, how to fiz this? Do what it says, rename the m-file you created (or got from somewhere else) to some name that doesn't conflict. -- ...

how to call a Matlab function from within a MEX function written in C?
Hi all, I have a MEX function written in C, let's call it Afunc.cpp, and I have another Matlab function called Bfunc.m (it is not from the Mathworks, so it is not the pre-defined Matlab function) Is it possible to call this Bfunc.m from within Afunc.cpp? It is because the Bfunc.m is too complicated and it used a lot Matlab predefined function which I don't how to rewrite in C/Cpp. So a simpler way for me is to let Afunc.cpp call Bfunc.m... How to do that? Thanks a lot! Mike wrote: > Hi all, > > I have a MEX function written in C, let's call it Afunc.cpp, >...

Web resources about - MATLAB function name passed in a function call - comp.soft-sys.matlab

Talk:Trigonometric functions - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Mathematics , a collaborative effort to improve the coverage of Mathematics on Wikipedia. If ...

Standing desks may boost students’ cognitive function as well as health
(credit: Texas A&M University ) Standing desks—most often installed in efforts to improve physical activity and health—may help get your noggin ...

Drop Point Knives: Function, Fit, Timeless
Drop Point Knives: Function, Fit, Timeless

Here's how squads and iron sights will function in Rising Storm 2: Vietnam
... roles and create a squad, and the creator can name, lock, or invite others to their little group. The more an outfit fills up, the more functions ...

Learning F# – Passing Parameters to Functions
One of the first issues I faced when learning F# was finding out how to specify multiple parameters to a function. While this might sound obvious ...

Slim and Soft Cover-Ups: Protecting Your Laptop with Function and Style
I’m a klutz. My phone has the scars and cracks to prove it. Likewise, my laptop bears scratches and dents in the lid, from me banging it into ...

Using AWS Lambda functions to create print ready files
... going to tell you about our processing architecture as well as at a recent performance improvement with the integration of AWS Lambda functions. ...

Power Through Your Work With a “Forcing Function”
... to flow faster and more easily when I know I only have a couple of hours to turn it in. Entrepreneur Dan Martell calls this a “forcing function” ...

Macphun Creative Kit 2016 review: Critical photo editing functions delivered in one diverse app
With Creative Kit, Macphun wants to pick up where Apple’s now-defunct Aperture left off. As a plug-in to Photos , Macphun’s apps significantly ...

Sample chapter: Working with functions
MICROSOFT PRESS publishes on Microsoft tools & technologies, plus programming best practices. Our blog offers book info, links to ebooks, & other ...

Resources last updated: 2/4/2016 7:59:30 PM