MATLAB grader error when running code

19 vues (au cours des 30 derniers jours)
Diane Peters
Diane Peters le 21 Nov 2019
Commenté : Diane Peters le 1 Déc 2019
I'm using MATLAB grader for an assignment in my class, and this assignment has worked before, but now is not. The code that's being run is this:
num1 = [1]; %numerator of filter
den1 = [1 1]; %denominator of filter
filter1 = tf(num1, den1) %Filter transfer function object
And the error:
Undefined function 'tf' for input arguments of type 'double'.
Error in solution (line 3)
filter1 = tf(num1, den1) %Filter transfer function object
  2 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 21 Nov 2019
Modifié(e) : KALYAN ACHARJYA le 21 Nov 2019
When I checked, no error
filter1 =
1
-----
s + 1
Continuous-time transfer function.
Diane Peters
Diane Peters le 21 Nov 2019
Wow, that's weird. My student showed me the error and then I went into learner preview and saw it myself.

Connectez-vous pour commenter.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 1 Déc 2019
The likely problem is that your course is running only using base MATLAB, but it needs to have the Control System toolbox in order to run the tf function.
For courses being offered on grader.mathworks.com, you need to specifically add the products (toolboxes) you want your students to have access to to your course. See this page in the documentation to see how to add the Control System toolbox to your coures.
  1 commentaire
Diane Peters
Diane Peters le 1 Déc 2019
That was it, thank you very much.

Connectez-vous pour commenter.

Plus de réponses (0)

Communautés

Plus de réponses dans  Distance Learning Community

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by