Hi, plz help me out in this problem

1 visualizzazione (ultimi 30 giorni)
waqas ahmad
waqas ahmad il 22 Mag 2015
Risposto: Image Analyst il 22 Mag 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

Risposta accettata

Image Analyst
Image Analyst il 22 Mag 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.

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB 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!

Translated by