I need help using the "extract" function in Matlab
Show older comments
Hi everyone,
I am currently building a code, which is modified from another freeshare code available online. However, I am unclear how the "extract" function in Matlab works. I have looked through the help menu and searched using Google as well. However, I haven't been able to get much help.
Currently, the extract function used in the code looks like this:
[F0,Lf0]=extract(x,nf);
I keep getting the error: ??? Undefined function or method 'extract' for input arguments of type 'double'. whenever I try to run the entire code.
The help menu offers me an explanation on the extract function. However, the extract function in the help menu appears to have an extra parameter added. (i.e. [outmatrix, freq] = extract (h,outtype,z0). It explains that: outtype can be one of these case-insensitive strings 'ABCD_parameters', 'S_parameters', 'Y_parameters', 'Z_parameters', 'H_parameters', 'G_parameters', or 'T_parameters'. z0 is the reference impedance for the S-parameters. The default is 50 ohms.
As such, I'm somewhat convinced the original code (which has been around for some time) is missing a parameter that doesn't allow it to run on newer Matlab versions. But, I am not entirely sure since I'm unsure what z0/reference impedance means in this function.
Would appreciate any help on this, or just any links to website that provides an explanation/example on how to use the "extract" function.
Thanks!
1 Comment
Nicolas
on 8 Jul 2012
I am also using the same code and i have the same problem.. have u fixed it
Accepted Answer
More Answers (2)
Wayne King
on 7 Oct 2011
It looks like from the error you are reporting that MATLAB is not able to find the function.
Did you add the folder that the function lives in to the MATLAB search path?
If you enter:
which extract
What is returned?
Use addpath() or pathtool and make sure you add all the folders you need to run the code you have downloaded.
Wayne King
on 7 Oct 2011
0 votes
I'm confused because your tags imply that your use case is an econometrics application, but the extract() help you cite is from a method in the RF Toolbox.
That extract() method expects that the input,h, is a rfckt, rfdata.data or rfdata.network object.
Is this really your application?
5 Comments
jj
on 7 Oct 2011
Wayne King
on 7 Oct 2011
JZ, the extract() method that you are citing the help for is NOT the extract method you think it is. Please tell us what
>>which extract
returns. Copy and paste the answer from the MATLAB command window. The help you are asking about is for a RF application.
jj
on 7 Oct 2011
Wayne King
on 7 Oct 2011
Why are you not answering the question I asked you?
"Please tell us what
>>which extract
returns. Copy and paste the answer from the MATLAB command window."
jj
on 7 Oct 2011
Categories
Find more on Parallel and Cloud in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!