Does codegen handle qz?
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have an m-file that I'm trying to run through codegen to create a mex file that uses the QZ decomposition. I get the following error: "??? Undefined function or variable 'qz'." I include the %#codegen tag, and the editor doesn't notice any problems in the file. Does anybody know of a workaround? I guess I could code my own version of qz, but this seems like it should be unnecessary.
0 Commenti
Risposta accettata
Arnaud Miege
il 26 Apr 2011
Unfortunately, qz is not listed in the Functions Supported for Code Generation, so yes, you'll need to write your own version of qz, using supported functions.
HTH,
Arnaud
4 Commenti
Più risposte (1)
Mike Hosea
il 26 Apr 2011
If you go with an extrinsic call, your call site should look something like one of these two. The pre-definition of the output types will probably save you a lot of trouble.
eml.extrinsic('qz'); %or coder.extrinsic starting in 11a.
AA = complex(zeros(size(A)));
BB = complex(zeros(size(A)));
Q = complex(zeros(size(A)));
Z = complex(zeros(size(A)));
V = complex(zeros(size(A)));
W = complex(zeros(size(A)));
[AA, BB, Q, Z, V, W] = qz(A,B,'complex');
AAr = zeros(size(A));
BBr = zeros(size(A));
Qr = zeros(size(A));
Zr = zeros(size(A));
Vr = zeros(size(A));
Wr = zeros(size(A));
[AAr, BBr, Qr, Zr, Vr, Wr] = qz(A,B,'real');
0 Commenti
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!