Error using FEVAL Produced on an Attempt at calling fplot
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
mitchell rifkind
le 11 Sep 2017
Modifié(e) : Karan Gill
le 17 Oct 2017
I'm a beginner to MATLAB and i'm doing a practice assignment in my textbook which literally gives me each command to run and i'm still getting errors so I think it might have to do with my textbook being outdated. The following are the commands;
a = 123 * 2 * pi / 360;
L = inline('9 / sin(pi - 2.1468 - c) + 7 / sin(c)');
fplot(L, [0.4, 0.5]); grid on
This is the error produced after the fplot() function;
Error using feval Undefined function 'ezfcnchk' for input arguments of type 'inline'.
There are a few more lines of errors that I can provide if needed. Any advice helps, thanks in advance.
0 commentaires
Réponse acceptée
Karan Gill
le 11 Sep 2017
Modifié(e) : Karan Gill
le 17 Oct 2017
First, a side note that you should format code in your posts: https://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup#answer_18099
Your textbook is quite outdated because "inline" isn't recommended anymore. You can check by looking up the "inline" page here: https://www.mathworks.com/help/matlab/ref/inline.html . There's a compatibility note at the top.
Following the note's recommendation, use an anonymous functions instead.
L = @(c) 9/sin(pi-2.1468-c)+7/sin(c);
Does it work?
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Function Creation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!