Hi, plz help me out in this problem

1 vue (au cours des 30 derniers jours)
waqas ahmad
waqas ahmad le 22 Mai 2015
Hi, I am trying to find roots of the equation in Matlab, using code "ist line: p = [ 2 22 0 184] 2nd line: r = roots(p)" but I get the message "??? Attempt to execute SCRIPT roots as a function:"........so what should I do...help me plz

Réponse acceptée

Image Analyst
Image Analyst le 22 Mai 2015
You didn't happen to call your m-file roots.m did you? If so, then when it runs this script, it tries to call itself as a function when it hits this line:
r = roots(p)
So it's trying to recursively call itself. But it's not a function that takes any arguments - it's just a simple script, so you get that error.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB 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!

Translated by