Replacing the '@' symbol for MATLAB Coder

1 view (last 30 days)
Hey guys, ran into an interesting issue when trying to replace the @ symbol. I was originally going to recode this by hand in C but it became a little bit more complicated than I thought so I thought I would re-look into removing @ from my code to enable it to build properly. Here's what I'm looking at:
So I discovered that my @ symbol was passing the same value every time to an anonymous function. So what I did is I removed the portion of the equation that had the @ symbol in it and I added in a line initializing my variable and setting it to the appropriate value. When I run the builder on one of my functions that calls the function containing the @ symbol, I now receive a new error referring to a function that I can't use Coder on anymore (The function 'qfunc' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation.) which I'm not terribly worried about. What I'm worried about is the other error that states that my function call is failing to the function that originally had the @ symbol.
So what I'm asking is should I go back to assuming I'll have to code this by hand or do you think there is a way I can get this to work. Thanks guys!!!
Adam Kaas
Adam Kaas on 30 May 2012
Function Line Description
InitFadePath 3 Function call failed.
Line 3 of InitFadePath is:
[a0, b0, zeta, sigma] = set_filter_params(x0);
set_filter_params is the function that originally had the @ symbol in it that I omitted.
Does that make more sense?

Sign in to comment.

Accepted Answer

Fred Smith
Fred Smith on 30 May 2012
Hi Adam,
What is the first error message you receive? The error message you mention above just means that there is something unsupported inside set_filter_params. A preceding error message should explain what that issue is.
There isn't enough information in your post to determine whether this will work or not with MATLAB Coder. Support for qfunc is the only issue mentioned in your post that is a clear problem. But it doesn't seem to phase you?
Good luck. -Fred
  1 Comment
Adam Kaas
Adam Kaas on 30 May 2012
qfunc is the line of code that errors out first. Says it is unsupported. I was assuming the function call was failing because I removed the @ symbol, but maybe it never reached the qfunc argument because of the @ symbol before. I know that a 'help qfunc' allows me to see the equation used for qfunc so maybe I'll just try replacing it with the equation and see what happens. Thanks Fred!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by